Skip to content

Instantly share code, notes, and snippets.

@moonmilk
moonmilk / README.md
Last active November 29, 2023 01:48
manually authorize a twitter app to a twitter account

So you're writting a twitterbot and you need to authorize your application to post to the account. You need an access token and secret for the account you're posting to. If the posting account is the same account that owns the application, no problem, you just push the button on your application's settings page to make the keys. But if you want to post to a different twitter account, there's no UI on apps.twitter.com to authorize it. So I made this bare-minimum node server to run through the authorization process. There's probably a much better way to do this, so please let me know what that way is!

ignore this and go down to the comments for better solutions

  • You'll need a server with node.js!
  • Make sure your application has a callback URL specified in its settings page, even if it's just a placeholder. If there's nothing in the callback URL slot, this method of authorization won't work.
  • In authorize.js, fill in your application's consumer key and secret, and the domain on which you'll be running th
@moonmilk
moonmilk / novelty_record.txt
Created November 12, 2014 03:15
log of @hafaslegomenon's test run
I
MISS
HIM
HURRY
UP
THURSDAY
OR
FRIDAY
ITS
NOT
@moonmilk
moonmilk / dreamhostpython.md
Last active August 12, 2022 16:15
trying to figure out useful info for running python on dreamhost shared hosting - intended for twitter bot makers

python for botmakers, on dreamhost shared hosting

On a shared hosting service like dreamhost, how do you get your twitter bot up and running? Problems:

  • where should I put my script?
  • you can't install python modules like tweepy (for twitter access) because you don't have root permission
  • once you get that solved, how do you run your script? cron?

I'm still figuring this stuff out myself, so nothing is clear as it should be. Hope this page will be a resource that will improve over time.

@moonmilk
moonmilk / cacophony.ino
Created February 12, 2015 04:41
instrument-a-day 2015, day 11: cacophony organ.
/* jeltone-style synth for arduino mega with a heap of LEDs crammed into the expansion port
* output 16 tones in accordion bass button layout for some reason
* See video at moonmilk.com or flickr.com/ranjit
*/
const int num = 16;
int increment = 15;
int pins[] = {52, 50, 48, 46, 44, 42, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22};
@moonmilk
moonmilk / crash dump analysis.md
Last active August 29, 2015 14:17
tracking down crashes in Highsight arduino code
@moonmilk
moonmilk / babyforsale.py
Created April 14, 2015 03:32
For sale: baby Synset('clothing.n.01'), never worn.
from nltk.corpus import wordnet as wn
clothing = wn.synset('clothing.n.01')
hypo = lambda s: s.hyponyms()
clothes = list(clothing.closure(hypo))
for clo in clothes:
for n in [a.name() for a in clo.lemmas()]:
if not "_" in n:
@moonmilk
moonmilk / dotcollection.json
Created May 31, 2015 23:20
graphics in tracery
{
"origin": [
"<svg width=\"400\" height=\"200\">#pattern#</svg>"
],
"circlecolor": [
"pink",
"cyan",
"yellow",
"orange",
"gray",
@moonmilk
moonmilk / newpentagon.svg
Created August 11, 2015 16:15
new tiling pentagon
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moonmilk
moonmilk / bottle_imp_1.ino
Created February 8, 2016 01:07
instrument-a-day 2016, day 7: Bottle Imp 1
// teensy 3.1 in USB MIDI mode
const int MIDI_CHANNEL = 1;
int NUM_THINGIES = 4;
const int TOUCH_PINS[] = {0, 1, 15, 16};
const int CONTROLLERS[] = {20, 21, 22, 23};
float touch[] = {0,0,0,0};
@moonmilk
moonmilk / vowel formants.maxpat
Created February 13, 2016 01:41
instrument-a-day 2016, day 12: vowel explorer
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 6,
"minor" : 1,
"revision" : 10,
"architecture" : "x86"
}
,