This file contains 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
# Get information about your notes | |
# create table notebooks ( | |
# title varchar(255), | |
# num_notes int, | |
# avg_time int, | |
# created_at timestamp default now() | |
# ); |
This file contains 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
(setq ay/disjoint-buffer '()) | |
(defun ay/disjoint-kill () | |
(interactive) | |
(add-to-list 'ay/disjoint-buffer | |
(buffer-substring-no-properties | |
(region-beginning) | |
(region-end))) | |
(delete-region (region-beginning) | |
(region-end))) |
This file contains 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
(add-to-list 'load-path "~/Dropbox/Mew") | |
(autoload 'mew "mew" nil t) | |
(autoload 'mew-send "mew" nil t) | |
;; Optional setup (Read Mail menu for Emacs 21): | |
(if (boundp 'read-mail-command) | |
(setq read-mail-command 'mew)) | |
;; Optional setup (e.g. C-xm for sending a message): | |
(autoload 'mew-user-agent-compose "mew" nil t) | |
(if (boundp 'mail-user-agent) |
This file contains 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
(defun jekyll-new-post (title) | |
"Create a new Jekyll blog post." | |
(interactive "sPost Title: ") | |
(let ((draft-file (concat "~/Dropbox/blog/_posts/" | |
(format-time-string "%Y-%m-%d-") | |
(replace-regexp-in-string | |
" " "-" (downcase | |
(replace-regexp-in-string | |
"[^A-Za-z0-9 ]" "" title))) | |
".markdown"))) |
This file contains 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 'java' | |
# All the files from cassandra/lib | |
require 'lib/antlr-3.1.3.jar' | |
require 'lib/apache-cassandra-0.6.1.jar' | |
require 'lib/avro-1.2.0-dev.jar' | |
require 'lib/clhm-production.jar' | |
require 'lib/commons-cli-1.1.jar' | |
require 'lib/commons-codec-1.2.jar' | |
require 'lib/commons-collections-3.2.1.jar' |
This file contains 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
# ` is an interesting key for a prefix | |
set-option -g prefix ` | |
# set-option -g prefix C-a | |
#unbind-key C-b | |
bind-key C-a last-window | |
bind-key ` last-window | |
bind-key a send-prefix | |
bind-key m save-buffer /tmp/tmux-buffer \; run-shell "exec sh -c pbcopy < /tmp/tmux-buffer" |
This file contains 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
# Change the following six lines to match your Gmail account details | |
set imap_user = "ykabhinav@gmail.com" | |
# set imap_pass = "PASSWORD" | |
set smtp_url = "smtp://ykabhinav@gmail.com@smtp.gmail.com:587/" | |
# set smtp_pass = "PASSWORD" | |
set realname = "Abhi Yerra" | |
set from = "ykabhinav@gmail.com" |
This file contains 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 'java' | |
# All the files from cassandra/lib | |
require 'lib/antlr-3.1.3.jar' | |
require 'lib/apache-cassandra-0.6.1.jar' | |
require 'lib/avro-1.2.0-dev.jar' | |
require 'lib/clhm-production.jar' | |
require 'lib/commons-cli-1.1.jar' | |
require 'lib/commons-codec-1.2.jar' | |
require 'lib/commons-collections-3.2.1.jar' |
This file contains 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
download_folder="$HOME/Dropbox/Space" | |
site="http://antwrp.gsfc.nasa.gov/apod/`date "+ap%y%m%d"`.html" | |
img_path=`curl -s $site | grep -i -e "<a.*jpg\>" | grep -o -e "\"\(.*jpg\)\"" | sed -e 's/"//g'` | |
dl_url="`dirname $site`/$img_path" | |
cd $download_folder | |
if [ ! -f `basename $dl_url` ] | |
then |
This file contains 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 | |
# sudo gem install rick-linode | |
require 'rubygems' | |
require 'open-uri' | |
require 'linode' | |
LinodeAPIKey = '<LINODE_API_KEY_HERE>' | |
DomainID = '<DOMAIN_ID>' | |
ResourceID = '<RESOURCE_ID>' |