Skip to content

Instantly share code, notes, and snippets.

@ChimeraCoder
ChimeraCoder / NumPy.ipynb
Created November 16, 2013 21:33
Note book from github.com/ChimeraCoder/intro-to-numpy-and-scipy. Details and license on the main repository. Linked here for http://nbviewer.ipython.org/
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ChimeraCoder
ChimeraCoder / gist:7495794
Last active December 28, 2015 11:49
Block all Gawker Media websites
127.0.0.1 gawker.com
127.0.0.1 gizmodo.com
127.0.0.1 kotaku.com
127.0.0.1 deadspin.com
127.0.0.1 lifehacker.com
127.0.0.1 jalopnik.com
127.0.0.1 io9.com
127.0.0.1 jezebel.com
127.0.0.1 gawkerassets.com
127.0.0.1 img.gawkerassets.com
mutt-helios-1000-20302-19161195591707227032 serverauth.y9zBW5cRoT
#include <stdio.h>
typedef struct T T;
struct T {
int x;
int y;
};
$ sudo lshw -C network
*-network
description: Wireless interface
product: Centrino Advanced-N 6230 [Rainbow Peak]
vendor: Intel Corporation
physical id: 0
bus info: pci@0000:02:00.0
logical name: wlan0
version: 34
serial: 00:db:df:0e:06:c8
@ChimeraCoder
ChimeraCoder / gist:6529812
Created September 11, 2013 21:09
script to start android tethering from bash
#! /bin/sh
adb shell input keyevent 3 # home
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.Settings
adb shell input keyevent 20 # down
adb shell input keyevent 20 # down
csv = CSV.parse(csv_text, :headers => true, :col_sep => ",", :quote_char => '"')
csv.each do |row|
full_text, all_phone_numbers, all_ids, top_id = row
puts(all_phone_numbers)
end
ssh -vvv git@heroku.com
OpenSSH_5.9p1 Debian-5ubuntu1.1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /home/phoenix/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to heroku.com [50.19.85.154] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/phoenix/.ssh/id_rsa" as a RSA1 public key
@ChimeraCoder
ChimeraCoder / gist:4728823
Created February 7, 2013 05:40
Sample env variable configuration
check-envars: guard-APP_SETTINGS uard-TWILIO_ACCOUNT_SID guard-TWILIO_AUTH_TOKEN
guard-%:
@if [ -z ${${*}} ] ; then \
echo "Environment variable $* not set"; \
exit 1; \
fi
@ChimeraCoder
ChimeraCoder / gist:4724666
Created February 6, 2013 18:28
Currying examples
(lambda (x y) (+ x y))
(lambda (x) (lambda (y) (+ x y))
type FoursquareResponse struct {
Meta struct {
Code int
ErrorType string `json:",omitempty"`
ErrorDetail string `json:",omitempty"`
}
//Notifications []map[string]interface{}`json:",omitempty"`
Response map[string]interface{}
}