Skip to content

Instantly share code, notes, and snippets.

@robinsloan
robinsloan / langoliers.rb
Last active April 7, 2024 13:22
The Langoliers, a tweet deletion script
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from dev.twitter.com
CONSUMER_KEY = "your_consumer_key"
@davej
davej / delete_all_tweets.py
Last active March 27, 2024 03:12
This script will delete all of the tweets in a specified account.
# -*- coding: utf-8 -*-
"""
This script will delete all of the tweets in the specified account.
You may need to hit the "more" button on the bottom of your twitter profile
page every now and then as the script runs, this is due to a bug in twitter.
You will need to get a consumer key and consumer secret token to use this
script, you can do so by registering a twitter application at https://dev.twitter.com/apps
@requirements: Python 2.5+, Tweepy (http://pypi.python.org/pypi/tweepy/1.7.1)
@WebReflection
WebReflection / ai2svg.md
Last active March 5, 2024 10:43
Transform AI to SVG, requires Inkscape

Save this file as ai2svg, make it executable via chmod +x ai2svg then run it optionally passing the folder to look for.

It will convert in that folder, or the current one, all .ai files into .svg

#!/usr/bin/bash

createsvg() {
  local margin="$1"
 local d
@MotionDesignStudio
MotionDesignStudio / ascii_movie_image_ver_1.py
Last active January 3, 2024 03:26
Python ASCII Video And ASCII Image Creator
#!/usr/bin/env python
import sys
import cv2
import subprocess
from subprocess import call
import aalib
import Image
@misterburton
misterburton / tumblr-delete-all-posts.js
Last active September 18, 2023 13:44
How to Delete All Tumblr Posts via JavaScript & the Browser Console
/*
Navitage to your mass post editor:
https://www.tumblr.com/mega-editor/[blog-name]
Open your browser's JavaScript Console and paste either of the following code snippets
*/
// delete 100 tumblr posts at a time (h/t Louis Lee: http://louisrli.github.io/blog/2013/05/11/how-to-delete-all-tumblr-posts/)
javascript:$('.overlay').slice(0, 100).click(); // you must now manually hit the 'delete' button at the top-right of the page
// delete all tumblr posts (h/t Hendry Sadrak [@hendrysadrak] a commenter on Li's above-linked post)
@flesueur
flesueur / deloldtweets.py
Created June 26, 2018 10:11
Delete (very) old tweets obtained from a twitter archive
#!/bin/python3
# Largely copied from http://www.mathewinkson.com/2015/03/delete-old-tweets-selectively-using-python-and-tweepy
# However, Mathew's script cannot delete tweets older than something like a year (these tweets are not available from the twitter API)
# This script is a complement on first use, to delete old tweets. It uses your twitter archive to find tweets' ids to delete
# How to use it :
# - download and extract your twitter archive (tweet.js will contain all your tweets with dates and ids)
# - put this script in the extracted directory
# - complete the secrets to access twitter's API on your behalf and, possibly, modify days_to_keep
# - delete the few junk characters at the beginning of tweet.js, until the first '[' (it crashed my json parser)
# - review the script !!!! It has not been thoroughly tested, it may have some unexpected behaviors...
@robinsloan
robinsloan / unfave.rb
Last active June 5, 2022 21:32
Unfave script, because why not??
#!/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
@silverhammermba
silverhammermba / terrible.rb
Last active May 23, 2022 17:45
Generates word searches with only a single word to find, but every letter in the grid is in the word.
#!/usr/bin/env ruby
# terrible word search generator
# inspired by http://cnlohr.blogspot.com/2014/02/to-make-terrible-wordsearches.html
if ARGV.length != 3
STDERR.puts "usage: #$0 WIDTH HEIGHT WORD"
exit 1
end
$word = ARGV[2].upcase
@velocityzen
velocityzen / auth.py
Created September 26, 2011 16:30
This script take pictures from directory and post it to tumblr blog and then delete it. Tumblr API v2! This example for oath file upload.
import urlparse
import oauth2 as oauth
consumer_key = ''
consumer_secret = ''
request_token_url = 'http://www.tumblr.com/oauth/request_token'
access_token_url = 'http://www.tumblr.com/oauth/access_token'
authorize_url = 'http://www.tumblr.com/oauth/authorize'
@Daniel15
Daniel15 / 1_Twitter autoresponder bot.md
Last active December 6, 2021 20:37
Twitter autoresponder bot

Twitter autoresponder bot

By Daniel15 (dan.cx) This is a very simple Twitter autoresponder bot. It requires PECL OAuth extension to be installed (run "pecl install oauth", or if on Windows, grab php-oauth.dll. If using cPanel you can install it via WHM). The authentication is designed for command-line usage, it won't work too well via a web browser. You'll have to sign up for an application on Twitter's site to get the consumer key and secret.

Could be modified to be more advanced (match regular expressions to answer questions, etc.)

Questions? See my blog post - http://dan.cx/blog/2011/06/twitter-autoreply-bot-dbznappa

Modified 2013-06-13 - Twitter API 1.0 discontinued, modified to use Twitter API 1.1