« first day (41 days earlier)      last day (3766 days later) » 

1:16 AM
Psst. @Undo Do you have a redirect_uri for me to use?
Or could I just make a website with Weebly or something else and check the log?
 
1:29 AM
And anyway, @Undo, will your comment flagging thingy allow me to get a key from my app with it's own API key, and then use it with your API key?
 
2:14 AM
@Undo I already did that yesterday.
 
3:04 AM
@hichris123 You could just use erwaysoftware.com, but I don't have any infrastructure built up for it.
What would I need to do?
 
Hmm... @Undo
I don't know.
 
(I have a full Apache server behind it)
 
I'm building one for myself.
 
I mean, I suppose you could just use it as a redirect URI and then I could check the logs and email you your token :P
But then if you ever send it over HTTP, SE automatically invalidates it and you have to start over ;(
 
@Undo What do you mean?
And say, it's my token but for my API key, not your service, right?
So I could never use it with your service, correct?
 
3:08 AM
@hichris123 Ooh.
Hmm
You can always just put your key in the source code.
But yeah
 
The thingy I'm creating to spit out keys asks for the API key.
 
@hichris123 Yes - it has to.
 
So it would be easier.
 
Here, lemme get my key.
 
Ug, it's above in one of your API requests.
 
3:09 AM
ArbQUPHJnLCe9wDjyecuJQ((
 
But I don't feel like looking for it.
Why does it have the (( at the end?
That's my question.
 
@hichris123 I dunno.
That's how they gave it to me.
2421
 
Weird
 
^ client id
 
What's the client id?
 
3:11 AM
@hichris123 2421
 
No, I mean what is it?
Like why do you need it?
 
Oh. It's a thingy.
Not sure what.
I know my iOS thing wants it.
You need it in both flows.
 
@Undo What's the difference between server-side and client-side authentication for OAuth?
 
@hichris123 Not sure.
 
Hmm...
The implicit OAuth 2.0 flow consists of the following steps:
1.Open a new window at stackexchange.com/oauth/dialog, with these query string parameters ◦client_id
◦scope (details)
◦redirect_uri - must be under an apps registered domain
◦state - optional

2.The user approves your app
3.The user is redirected to redirect_uri, with these parameters in the hash◦access_token
◦expires - optional, only if scope doesn't contain no_expiry
Looks a lot easier to use client-side.
 
3:25 AM
I'm working on something that uses server-side.
 
It looks like it's storing it in a database (server) vs. using it in an app or giving it to the user (client)
 
@hichris123 @Undo I got an easy way to make access tokens
With the key: oBhIoUA)i7UXiHOFqgMaPw((
 
@ManishEarth It doesn't have write_access ;(
 
yes it does
it does inbox magic
 
No write_accessy thingies
 
3:36 AM
oh
@Undo is the write access specified in scope?
 
@ManishEarth Yes
 
So... does it not work?
 
@ManishEarth Yup
> Ability to create and change content
A fully loaded one looks like this:
 
3:40 AM
@ManishEarth Yah, like that.
 
@Undo deleting one of my own comments didn't work :/
{
"items": [],
"quota_remaining": 9999,
"quota_max": 10000,
"has_more": false
}
 
> Scope

> With an empty scope, authentication will only allow an application to identify a user via the /me method. In order to access other information, different scope values must be sent. Multiple values may be sent in scope by comma or space delimitting them.

> read_inbox - access a user's global inbox
> no_expiry - access_token's with this scope do not expire
> write_access - perform write operations as a user 2.1
> private_info - access full history of a user's private actions on the site.
@ManishEarth Oh
 
@Undo are you able to delete your own comments?
 
@ManishEarth Haven't checked.
 
try
 
3:44 AM
@ManishEarth what url did you call?
 
with an access token
 
@ManishEarth You have to POST it.
GET doesn't work
 
@Undo I used the api testing thingy
 
Oh
@ManishEarth Make sure you have errors enabled in the filter.
 
they are
 
3:47 AM
Huh
 
The token is correct too, with a different token it gives an error
 
Hrmph
I'm gonna try to delete:
This is a comment from the API! — Undo the Snowman 2 days ago
Oh.
> In practice, this method will never return an object.
@ManishEarth is the comment gone?
 
nope
 
@ManishEarth Did you turn preview to false?
 
3:50 AM
Yep, worked for me
No idea why that's in there.
 
gone
@Undo I think preview checks for errors
 
@ManishEarth See if it works on other people's comments with your diamond.
 
yep
 
Hmm...
sounds useful.
 
@Undo tested the comment flag option yet?
 
3:52 AM
@ManishEarth Oh yes.
 
Don't get any ideas :P
 
 
oh right
 
@ManishEarth A command-line flagger gizmo!
@ManishEarth There's even a delete post method now.
 
scary
 
3:55 AM
I've been looking for voting methods, can't find any
And you can edit posts
And cast close votes
 
Huh
Eeeek
Why couldn't I find that?
I was doing create-answer-upvote and the like.
 
hahaha
@Undo Try to list all the stuff you find in a shared gdoc
The unofficial API 2.2 docs :P
 
@ManishEarth Where at?
 
@Undo google doc
one sec
@Undo add yourself to the access list over there, then I can put it in read only mode
 
4:07 AM
Sorry, dropped off the Interwebs for a second :P
@ManishEarth Done, I think.
 
yep
if Chris wants I can add him too.
we can just jot down useful stuff there
 
Sounds good.
And now you know my name again :P
 
heh
Hmm, api.stackexchange.com/docs/create-comment-flag only takes one id. Bummer
done
 
You and your mod powers
 
@Undo Why isn't there jquery on charcoal?
 
4:19 AM
@ManishEarth There is.
gtg
 
And do you mind if I add jquery? I'm working on an autoflagger
hm
 
@ManishEarth Goforit.
 
I hate mobile Google Drive. Should really use the app.
 
Oh, they do have an app don't they.
 
Nope. Google doesn't make apps. That's a preposterous idea.
 
4:28 AM
Oh
@ManishEarth There has to be a list of the 2.2 methods somewhere, right?
 
So what are we putting in terms of the methods in the document?
 
@Undo I looked for it, couldn't find
@hichris123 any unlisted write methods or useful tidbits
 
@hichris123 Just the plain list of links, with paragraphs at the top for special stuff.
 
@Undo First I'll commit some code that adds some HTML classes and ids, which will make life easier.
 
Go for it.
 
4:30 AM
I mean with the etc's, what aren't we putting in?
 
@hichris123 Just throw whatever you want in.
 
@hichris123 the obvious stuff: upvote-answer implies downvote-answer and upvote-question and all. But feel free to explitify that :P
 
Ah, I was thinking like flag-comment and flag-post
 
@Undo care to update Charcoal from Git?
 
@ManishEarth Sure, whenever you want.
 
4:34 AM
now would be nice :P
 
Ok
 
@Manish What did you add?
 
Let's see, just a git pull, right?
 
Once that is done I can write oodles of javascript on client side without having to poke you every few minutes for a test
@hichris123 a couple of classes and a data- attribute
 
Done, I think
 
4:38 AM
@Undo once more, I made a booboo :P
 
Ok
There
 
thanks :)
 
no problem
 
 
1 hour later…
5:42 AM
@Undo around? I'll need a pull in a minute (not just yet)
 
5:52 AM
@Undo pull please :)
 
 
2 hours later…
8:19 AM
@Undo I think I have gotten a working comment collector thingy now, but I'm not sure
@Undo I have an idea: Why not add a dev version on /charcoaldev? Let it use the same db (or an old copy of the db), and give me an extra PHP script that runs a git pull to the dev page (<?php exec("git pull"); or something). That way I can mess around without needing to poke you every time, and without breaking things :P
An open source project I work with has that. There is a "sandbox" site, which devs can update by calling a particular command in the presence of an IRC bot. The main site can only be updated by the core devs
 
Quick explanation of the new UI:
Whatever comments are ticked before validating are added to a queue. If you tick all comments in the context, the post ID is added to a different queue instead.
Every few minutes, just go to the top, select the correct flag option, click Generate, copy paste the generated code into the JS console on the relevant site, and run. It will slowly flag the posts (the current throttle is 5.1 seconds between each flag; I forgot the ratelimits for comment flag and custom flags and will need to recheck)
For the queued posts, you can batch-flag them with the same flag message using the second set of controls.
 
 
4 hours later…
12:19 PM
> If you tick all comments in the context, the post ID is added to a different queue instead.
I think the actual comment IDs should be preserved anyway
While there is a "purge all comments" function in the mod menu it would also nuke future comments which might be worth keeping
 
 
1 hour later…
1:23 PM
@ManishEarth I'm around now!
Holy cow, you made that? It looks amazing.
@ThiefMaster Oh, I made a typo - I was thinking comment ID, and wrote post ID.
 
@Undo oy
there?
 
Yep!
Pulled
 
I was going to ask you to wait till I rebooted into linux, but oh well :P
 
@ManishEarth Oh :P
 
one sec, be back and then I'll debug
 
1:27 PM
Ok
 
Test it out if you want
 
I will.
 
is it borked?
 
Not yet.
Right now I'm working on /charcoaldev
 
1:33 PM
@ManishEarth Ok, cloned everything down.
 
yay
Ok, it's half borked. The post thing works, but the comment thing doesn't. Hmmmm
 
I just noticed that.
 
makes more hmmmming noises
It's probably the magicky slicing I've done
 
I have a pull.php file in /charcoaldev that looks like this: <?php exec("git pull");
But I doubt it works, because I always need to be sudo to use it.
How do I get around that? Can I allow Apache to sudo that one command?
 
@Undo setuid
ok, minor js borks
 
1:38 PM
1
Q: Allow Apache to execute git pull

PeterHaven't been able to figure this out yet.. I've seen a few answers around but none of them help. I'm trying to use Github Webhooks to have github hit a url on my server and have the server pull down newly committed items as soon as that hits. I have a php script with the following: <?php `git p...

Aha!
 
@Undo bows to the stackoverlords
.....
I'm an idiot
(made some stupid mistakes)
@Undo pull plz :)
 
@ManishEarth /charcoaldev is all working. Try it out.
pull.php
 
yay nice
1 file changed, 8 insertions(+), 6 deletions(-)
spooky
 
I know, right?
 
@Undo same db or different db?
 
1:47 PM
@ManishEarth Same one. Do we need a different one?
I can do that.
 
Nah.
 
I'll make a different smaller one.
 
If it was different I could mash keyboards with impunity, but no need.
 
I feel like making a new DB today :P
@ManishEarth it's on a DB copy now.
I''ll probably slim it down so it takes up less space.
 
time to mash keyboards! HULK SMASH
 
1:51 PM
Hehehe
 
@Undo now challenge Oded to break into your dev tier
 
@ManishEarth Hmm...
He would just put some kind of injection in the next data dump.
@ManishEarth Just curious, how do you edit the code? Just with GitHub's native thingy, or what?
@ManishEarth we have a problem
 
@Undo Randomly. Right now, Github thingy. In the morning, I was first using gedit and a local working directory, then switched to github after coming back from a snack
@Undo ?
 
the code all assumes that it's in the /charcoal directory, and all the links redirect to there.
So you don't end up staying in /charcoaldev
 
uh oh
 
2:00 PM
@ManishEarth how do we fix that?
 
@Undo Will relative paths work? Or do you want a config option?
 
@ManishEarth Whatever works best :P
@ManishEarth but what are config options?
 
@Undo An extra variable/method in config.php that will set the URL
 
@ManishEarth That would be nice.
Then we could have extra little debug things in the dev tier (that's soo fun to say), right?
 
@Undo that too
 
2:04 PM
It would sure be nice...
Then we would .gitignore config.php, right?
 
@Undo yes. Why not rename creds.php to config.php?
 
@ManishEarth No reason why not.
 
@Undo have a look at the new readme
 
@ManishEarth Looks awesome :D
 
Why is Charcoal only for SO, Server Fault, and a few other sites?
 
2:09 PM
@RyanCarlson Primarily because I have to import the data by hand. Where else should it be?
(beta sites won't work yet)
 
Ah
Personally, I think it should be for every site.
But that's a bit time consuming
 
@RyanCarlson I do too. I just have no way to automate it
 
@Undo Alright, move creds.php for both to config.php, add the two extra lines (be sure to set the dev function to true in the dev version), and then git pull
I need to pop off for a bit, be back
 
@ManishEarth Ok
 
the comment collector seems to be working aside from some minor things which I can fix.
If it does work, flagging with Charcoal will be 90% less annoying because no more of that flag-wait-for-ratelimit-flag stuff :P
 
2:15 PM
Yay!
 
Oh, @Undo, I also will need to know the ratelimits for comment flags and custom post flags -- feel free to flagspam Physics (with real flags though, not random ones) and I can clear them when I get back (5 mins)
 
@ManishEarth Ok, when I get done with this.
I'd bet they're the same as the UI limits.
gtg
Uh oh, charcoal's borked.
 
@Undo works for me
 
@ManishEarth I just fixed it
See latest commit.
 
oh ninja magic
oh I see
shakes fist at GitHub editor for adding extra quotation marks
 
2:24 PM
Hehe
Sublime Text does the same thing.
 
@Undo pull on main again, had to fix some additional borking
 
Ok
Done
 
2:44 PM
@Undo check it out on dev now
It ought to be working
 
2:57 PM
I think the feature is done then
no wait
forgot the best part. the mod stuff!!111 :P
 
3:35 PM
Mod stuff now working
 
So what happened while I was asleep, @Manish?
 
@hichris123 I added a totally awesome feature
 
@Manish Does it work?
 
The one on charcoaldev does
Not sure if the one on charcoal does
(Undo added a dev site)
 
Give me a sec to login to Charcoal
So is dev just another tab?
 
3:37 PM
@hichris123 nah. /charcoaldev
Runs on a different db, and newer code
 
Yeah, you kind of broke Charcoal regular
 
@Undo pull on regular plz?
@hichris123 where broke?
 
@Manish Also on dev. I'm on Chrome, when I click on SO in the tabs it displays your new fancy thing at the top, but no comments.
 
works for me
@hichris123 try clicking more tabs
 
@Manish It works fine if I'm on Physics (the main one), but whenever I click off of Physics it doesn't
 
3:46 PM
hmm
maybe Undo did some strange settings for charcoaldev
 
Maybe...
Let's try on IE9...
It works on IE9, but not Chrome 33.0.1712.4 @Manish.
 
huh
I'm on chrome
 
I'm on Chrome Dev tier, so that might have something to do with it
You?
 
@hichris123 probably yes
Chrome Beta. or stable
dunno
 
You want me to try it on Chrome Canary? :)
@Manish So do I just copy and past the script into the Console on SO?
 
4:01 PM
@hichris123 yeah
not yet fully tested though, so keep an eye on your flag history
if it works, you should get an entry in the console (and flag history) every 5 seconds
 
Okay, I'm getting this script:
var taskList=[];
var flagoption=22;
var originallength=taskList.length;
POSTFlag=function (){
if(taskList.length>0){
	console.log("Flagging comment #"+(originallength - taskList.length+1) +" of "+  originallength)
	$.post("/flags/comments/"+taskList.shift()+"/add/"+flagoption,
		JSON.parse('{"fkey":"'+StackExchange.options.user.fkey+'","otherText":""}'),
		function(){console.log('(done)');setTimeout(POSTFlag,5100);}
	);
}else{
	console.log("Finished");
}
}
POSTFlag()
Is that what it's supposed to be?
Oh, do you have to click the checkboxes, and not valid?
No, it's still not working, with the same script.
 
@hichris123 There's nothing in tasklist
@hichris123 Um, have you done any ticking of checkboxes?
 
Oh, nevermind.
I get it now.
You click the checkboxes, then click valid.
 
And then a little green thingy accumulates. And you can flag in batch with generate
 
Thanks, this is wonderful!
 
4:23 PM
@hichris123 added some disabling so you don't get confused
 
Thanks.
 
 
1 hour later…
5:55 PM
@hichris123 added a bit of help text. Took so long because the bootstrap was a bit older and modal was acting strange
 

« first day (41 days earlier)      last day (3766 days later) »