Skip to content

Instantly share code, notes, and snippets.

@moonmilk
moonmilk / README.md
Last active Jun 29, 2021
manually authorize a twitter app to a twitter account
View README.md

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 / dotcollection.json
Created May 31, 2015
graphics in tracery
View dotcollection.json
{
"origin": [
"<svg width=\"400\" height=\"200\">#pattern#</svg>"
],
"circlecolor": [
"pink",
"cyan",
"yellow",
"orange",
"gray",
@moonmilk
moonmilk / alphabetical-prefixes.txt
Last active Sep 5, 2020
words that differ only in the last letter
View alphabetical-prefixes.txt
aa ad ae ah ai ak al am an ar as at aw ax ay
aal aam
Ab Ah Al Ao As Ay
aba abb abu aby
abac abas
abaca aback
abaff abaft
abandoned abandonee abandoner
abase abash abask
abased abaser
@moonmilk
moonmilk / dreamhostpython.md
Last active Aug 21, 2020
trying to figure out useful info for running python on dreamhost shared hosting - intended for twitter bot makers
View dreamhostpython.md

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 / diatonic mold.stl
Created Apr 9, 2019
diatonic pineapple mold
View diatonic mold.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moonmilk
moonmilk / optic mold.stl
Created Apr 9, 2019
pentatonic pineapple draft
View optic mold.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moonmilk
moonmilk / lobsterbowl.ino
Created Feb 20, 2017
instrument-a-day 2017, day 18: lobster bowl
View lobsterbowl.ino
// Lobster Bowl arduino due touch glitch thing
// readCapacitivePin
// Arduino Due version, from http://playground.arduino.cc/Code/CapacitiveSensor
// Input: Arduino pin number
// Output: A number, from 0 to 17 expressing
// how much capacitance is on the pin
// When you touch the pin, or whatever you have
// attached to it, the number will get higher
uint8_t readCapacitivePin(int pinToMeasure) {
@moonmilk
moonmilk / ofxMSAWord2Vec playground.ipynb
Last active Jul 5, 2016
messing around with ofxMSAWord2Vec
View ofxMSAWord2Vec playground.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moonmilk
moonmilk / whisperer2.ino
Created Feb 18, 2016
instrument-a-day 17: teensy whisperer
View whisperer2.ino
// whisperer2 for teensy 3.1/3.2 with teensy audio board
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=253,396
@moonmilk
moonmilk / bottle_imp_1.ino
Created Feb 8, 2016
instrument-a-day 2016, day 7: Bottle Imp 1
View bottle_imp_1.ino
// 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};