Skip to content

Instantly share code, notes, and snippets.

Christian Genco christiangenco

Block or report user

Report or block christiangenco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View WalkieSockie.ino
// WalkieSockie
// Christian Genco: @cgenco
// An alternate input/output device for the feet
// pins
static int pressurePin = A5, vibratorPin = 11;
// thresholds
static int pressureLow = 0, pressureHigh = 1000,
vibeLow = 0, vibeHigh = 255;
@christiangenco
christiangenco / hn_impersonator.rb
Created Oct 7, 2014
Impersonate your favorite HN commenter
View hn_impersonator.rb
require 'http'
require 'json'
require 'peach'
require 'gabbler'
require 'pry'
USERNAME = "patio11"
unless File.exists?("comments.txt")
def get_json(url)
@christiangenco
christiangenco / dbinbox.en.yml
Created Sep 5, 2014
dbinbox.com language files 2014-09-05
View dbinbox.en.yml
en:
edit: edit
delete: delete
embed_code: embed code
authenticate: authenticate
@christiangenco
christiangenco / MouseDetector.coffee
Created Sep 4, 2014
Detect if a browser has a mouse or not
View MouseDetector.coffee
class MouseDetector
constructor: () ->
@events = {
hasMouse: []
noMouse: []
}
mousemoves = 0
mouseFirstMoved = null
@christiangenco
christiangenco / parse_abcddb.rb
Created Jun 6, 2014
Get a csv from an Apple Address Book ".abbu" archive
View parse_abcddb.rb
require 'csv'
require 'pry'
# sqlite3 AddressBook-v22.abcddb
# .headers on
# .mode csv
# .output ZABCDPOSTALADDRESS.csv
# select * from ZABCDPOSTALADDRESS;
# .mode csv
# .output ZABCDRECORD.csv
View hash_array_to_csv.rb
class Array
def to_csv(csv_filename="hash.csv")
require 'csv'
CSV.open(csv_filename, "wb") do |csv|
csv << first.keys # adds the attributes name on the first line
self.each do |hash|
csv << hash.values
end
end
end
@christiangenco
christiangenco / keybase.md
Created Apr 9, 2014
Github ownership proof for keybase.io
View keybase.md

Keybase proof

I hereby claim:

  • I am christiangenco on github.
  • I am cgenco (https://keybase.io/cgenco) on keybase.
  • I have a public key whose fingerprint is D1FA 6659 4379 E5B3 3867 9FF4 FF22 DC2D 357E 4A3C

To claim this, I am signing this object:

@christiangenco
christiangenco / smu_swipes.rb
Created Mar 27, 2014
Download the swipes and flex dollars left on your SMU ID card.
View smu_swipes.rb
#!/usr/bin/env ruby
# Author: Christian Genco (@cgenco)
# 2013-09-04
SMU_ID = "SMU STUDENT ID GOES HERE"
SMU_PW = "SMU PASSWORD GOES HERE"
require 'time'
@logfilename = "/Users/cgenco/Dropbox/flex.log"
@christiangenco
christiangenco / .bashrc
Created Jan 23, 2014
Use `vime FILENAME` to create and edit encrypted files.
View .bashrc
alias vime="vim -u ~/.encrypted_vimrc -x"
View Retina MacBook Ubuntu bootable USB stick
# download this: http://www.ubuntu.com/download/desktop
# convert it to an img
hdiutil convert -format UDRW -o ~/Downloads/ubuntu.img ~/Downloads/ubuntu-12.04.3-desktop-amd64.iso
# remove .dmg extension
mv ~/Downloads/ubuntu.img.dmg ~/Downloads/ubuntu.img
# figure out which drive your usb stick is
diskutil list
You can’t perform that action at this time.