Skip to content

Instantly share code, notes, and snippets.

@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)
@nukemberg
nukemberg / knife.sh
Created June 28, 2011 07:51 — forked from ches/knife
bash completion for Chef's knife command (updated for 0.10)
# vim: ft=sh:ts=4:sw=4:autoindent:expandtab:
# Author: Avishai Ish-Shalom <avishai@fewbytes.com>
# We need to specify GNU sed for OS X, BSDs, etc.
if [[ "$(uname -s)" == "Darwin" ]]; then
SED=gsed
else
SED=sed
fi
@dhepper
dhepper / gen_aliases.sh
Created January 3, 2012 19:35
Generated aliases for Django management commands
for CMD in `python -c 'from django.core import management; print " ".join(management.get_commands().keys())'`
do
alias dj${CMD}="django-admin.py ${CMD}"
done
@dhepper
dhepper / append_gen_aliases.sh
Created January 4, 2012 08:37
Adds a script to generate aliases for Django management commands to bin/activate
cat <<EOT >> bin/activate
for CMD in \`python -c 'from django.core import management; print " ".join(management.get_commands().keys())'\`
do
alias dj\${CMD}="django-admin.py \${CMD}"
done
EOT
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 7, 2024 07:28
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@afair
afair / tmux.cheat
Last active June 3, 2024 23:26
Tmux Quick Reference & Cheat sheet - 2 column format for less scrolling!
========================================== ==========================================
TMUX COMMAND WINDOW (TAB)
========================================== ==========================================
List tmux ls List ^b w
New new -s <session> Create ^b c
Attach att -t <session> Rename ^b , <name>
Rename rename-session -t <old> <new> Last ^b l (lower-L)
Kill kill-session -t <session> Close ^b &
@ywatase
ywatase / _knife
Created October 2, 2012 12:34
zsh completion for knife of chef
#compdef knife
_knife_all_subcommand_with_desc () {
_subcommands=(${(@f)"$(knife --help | perl -e 'while(<>){/\A\*\*\s(.+)(?:\sCOMMANDS)?\s\*\*\s*\z/ or next; (my $desc = lc($1))=~s/\s+commands//;($line = <>)=~/knife\s($desc)/; print qq{$1\n$desc\n};}')"})
_1st_arguments=(${(k)_subcommands})
}
_knife_subsubcommand() {
_2nd_arguments=(${(@f)"$(knife $1 --help | perl -nle "/^knife\\s$1\\s(.*)/; print \$1;")"})
}
@echristopherson
echristopherson / macvim.rb
Created November 19, 2012 03:54
macvim-with-breakindent-patch.rb
require 'formula'
class Macvim < Formula
homepage 'http://code.google.com/p/macvim/'
url 'https://github.com/b4winckler/macvim/tarball/snapshot-65'
version '7.3-65'
sha1 'fa5f6e0febe1ebcf5320a6ff8bcf4c7e39eccf8e'
head 'https://github.com/b4winckler/macvim.git', :branch => 'master'
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active June 5, 2024 22:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

include_recipe "apt"
include_recipe "python"
execute "upgrade packages" do
command "apt-get -y upgrade"
action :nothing
end.run_action(:run)
package 'vim'
package 'python-setuptools'