Skip to content

Instantly share code, notes, and snippets.

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCva9b16DAzHOSRLNkMw5Fy3jSZsT7ox/o+ukSpho6FMx8UOJgu02QYH497dsSpIpb6s1s1DAKUCde4VrybbXEYYf5Og8xh08aP9UO+0IpNFQyLtqtOnmRe4H53Wtb2iMsqPG3ou2lggUuKcvOelvaMacy0rpIPfnO0fKrdH2d6hi/eeehsN686MN+yXng0V+QWlMkssVZ7dYo8+XQ5S+Qjp767rLFpdvHBa+rj9zce/yOwSaTg6qoWJ+EbeMS1RlaOm2kA5WDngmL1t46dpTyKC+uWz8u8EK4SgloUabMVU333vAVZv5Q8Z9UotjKFaRMz2zuvxULnSN5rS+9riCJ1 [email protected]
@handsomesunbird
handsomesunbird / sc.js
Last active December 27, 2015 23:49
Example of PhantomJS. Makes screenshot of webpage.
if (phantom.args.length < 2) {
console.log('Usage: sc.js URL filename [widthxheight]');
phantom.exit();
}
var url = phantom.args[0];
var output = phantom.args[1];
var page = require('webpage').create();
if (phantom.args.length === 3) {
/* clang keystat.c -o keystat -framework ApplicationServices */
#include <ApplicationServices/ApplicationServices.h>
#include <stdio.h>
CGEventRef cb(CGEventTapProxy proxy, CGEventType type,
CGEventRef event, void *refcon)
{
if (type == kCGEventKeyDown)
{
@handsomesunbird
handsomesunbird / bash_config.sh
Last active December 23, 2015 17:29 — forked from igrigorik/github.bash
1) opens Github or Bitbucket page of current project 2) check JSON and formatting it
alias ghbb="open \$(ruby -e \"print %x(git remote -v).match(/origin\\s(\\S+)\\s\\(fetch\\)/)[1].gsub(/:/,'/').gsub(/^.*?git@/,'http://')\")"
alias jsonfmt="python -m json.tool"
#!/usr/bin/env ruby
require 'net/http'
require 'uri'
require 'json'
require 'open-uri'
USAGE = "USAGE: #{__FILE__} <FILENAME> # where FILENAME is name of the file with keywords"
def google_query(keywords)
execute pathogen#infect()
filetype plugin indent on
syntax on
set guioptions+=mTrblLR
set guioptions-=mTrblLR
set encoding=utf-8
set guifont=Consolas:h13
@handsomesunbird
handsomesunbird / diff_folders.sh
Created August 26, 2013 04:53
Find unique files in directories and remove files from first optionally.
#!/bin/bash
# Find unique files in directories and remove files from first optionally.
# USE TRAILING FORWARD SLASH IN DIRECTORY NAMES: ./diff_folders.sh github/ github2/
[[ $# -lt 2 ]] && echo "USAGE: $0 <directory_1> <directory_2> [delete]" && exit 1
tmp_1="/tmp/diff_folder_$RANDOM"
tmp_2="/tmp/diff_folder_$RANDOM"
#!/usr/bin/env ruby
require 'date'
require 'open-uri'
require 'rexml/document'
include REXML
def read_list_of_urls
result = []
begin