This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # for when you have a bunch of images in a dir that are not *quite* | |
| # numbered the way ffmpeg wants them to be, e.g. | |
| # image-1, image-2, ... image-10, image-11, ... image-100, image-101 | |
| if ARGV.length < 1 | |
| puts "Usage: ruby makevideo.rb name-of-directory-with-all-your-dang-images-in-it" | |
| exit | |
| end | |
| dir = ARGV[0] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "rubygems" | |
| require "twitter" | |
| # get these from apps.twitter.com | |
| CONSUMER_KEY = "abcd" | |
| CONSUMER_SECRET = "abcd" | |
| OAUTH_TOKEN = "abcd" | |
| OAUTH_TOKEN_SECRET = "abcd" | |
| TWITTER_USER = "your_username" # needs to be the one associated with keys above |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from PIL import Image | |
| import glob | |
| import numpy as np | |
| ### TUKEY WINDOW | |
| ### https://leohart.wordpress.com/2006/01/29/hello-world/ | |
| def tukey_window(window_length, alpha=0.5): | |
| # Special cases | |
| if alpha <= 0: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import subprocess as sp | |
| import numpy as np | |
| import signal | |
| from PIL import Image | |
| ### TUKEY WINDOW | |
| # https://leohart.wordpress.com/2006/01/29/hello-world/ | |
| def tukey_window(window_length, alpha=0.5): | |
| # Special cases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "twitter" | |
| require "json" | |
| require "faraday" | |
| # things you must configure | |
| TWITTER_USER = "your_username" | |
| # get these from dev.twitter.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ffmpeg -i this_here.gif -vcodec h264 -y -pix_fmt yuv420p that_there.mov |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "rubygems" | |
| require "twitter" | |
| # get these from apps.twitter.com | |
| CONSUMER_KEY = "foo" | |
| CONSUMER_SECRET = "bar" | |
| OAUTH_TOKEN = "blee" | |
| OAUTH_TOKEN_SECRET = "baz" | |
| TWITTER_USER = "your_username" # needs to be the one associated with keys above |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "rubygems" | |
| require "twitter" | |
| require "json" | |
| require "csv" | |
| #require "date" | |
| # things you must configure | |
| TWITTER_USER = "your_twitter_username" | |
| MAX_AGE_IN_DAYS = 7 # anything older than this is deleted |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # First, | |
| twurl authorize --consumer-key YOUR_CONSUMER_KEY --consumer-secret YOUR_CONSUMER_SECRET | |
| # Then, | |
| twurl -A 'Content-type: application/json' -X POST /1.1/direct_messages/welcome_messages/new.json -d '{"welcome_message": {"name": "autoresponder", "message_data": {"text": "Hi! I am not currently checking DMs. You can email me instead 👉 YOUR EMAIL HERE"}}}' | |
| # In the response, note the id of the returned welcome message object, because you'll need it in a moment. |