Skip to content

Instantly share code, notes, and snippets.

View seanknox's full-sized avatar
🙋‍♂️

Sean Knox seanknox

🙋‍♂️
  • San Francisco, CA
View GitHub Profile
@robinsloan
robinsloan / shh.rb
Last active August 18, 2023 12:09
Disable RTs from all the people you follow on Twitter.
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
#!/bin/bash
set -ex
daz() {
docker run -v $GOPATH/src/github.com/Azure/acs-engine:/acs-engine -v $HOME/.azure:/root/.azure -it --rm azuresdk/azure-cli-python:latest az $*
}
export CLUSTER_NAME=$1
export CLUSTER_LOCATION=$2
@FUT
FUT / install-redis.sh
Last active April 19, 2022 11:16
Install Redis on EC2
1. Install Linux updates, set time zones, followed by GCC and Make
sudo yum -y update
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
/etc/localtime
sudo yum -y install gcc make
2. Download, Untar and Make Redis 2.8 (check here http://redis.io/download)
@cdata
cdata / timebinder.md
Last active December 30, 2015 04:39
A fun JavaScript exercise.

Timebinder

I need a utility function. Let's call the function timebinder. This timebinder function expects two arguments: the first is a callback function, and the second is a number that represents some amount of milliseconds. The return value of the timebinder function is another function.

The function returned by timebinder expects a single argument: a context. When I call the returned function and pass a context, there is no return value. Then, the original callback function that I passed to timebinder should be called at the number of milliseconds I specified in the future.

Here are some example usages (assume we are executing in the browser window context):

var callback = function() {