Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@bhelx
bhelx / books.md
Last active December 21, 2015 17:08
Trying to reduce my library. Most of these books I got in college. My plan is to give them away.

Java (some textbooks)

  • Java: The Good Parts
  • Java: Concurrency in Practice (feat. Paul Christmann)
  • Java Generics and Collections
  • Java Web Services Up and Running
  • Data structures and other Objects using java
  • Spring MVC and Web Flow
  • Big java (second edition)
  • Effective Java (good java book)
@bhelx
bhelx / doge.txt
Created October 11, 2013 15:45
doge
:::::::::::::::---:::///:///:::::///::::::--........................................................
::::::::::::::::::::///:://::--:://++/:::---....................................----................
:::::::::::::::::/::::::::------:/++o+/::--..................................-:///++/-..............
::::::::::::::://:::-------..---:/++ooo+/:-.................................-:/+++ooso-.............
::::::::::::::::::-------....--::/++ooo+++:-.............................--:/+++++ossso-............
:::::::::::------------.....--::///++ooo+++/:---........................-://++++++ooosso-...........
::----------..------......---::/++++/////////////:::::----------.....-://+oso++ooooossss/...........
----......------------------:///+////:::////////////////////////////://++osoooooosssssoso:..........
......--------------::::///:/::::::::::///////////////////////////+oo++oossooossyyyyysooo+..........
-------::::::://////++++//:::::::::::///////++/++/////////////////++ooosyyoo+osyhhhhysooso-.........
@bhelx
bhelx / safe_store.rb
Last active December 27, 2015 21:09
Securely store and retrieve a file from an external drive
# This script allows securely storing and retrieving a file to USB drive using rbnacl
#
# Usage:
#
# 1) Generate a private key:
#
# ruby safe_store.rb --generate-key -k /Volumes/SAFEUSB/my_private_key.key
#
# 2) Write the ciphertext file to your drive (mine is named PATRIOT).
# This will write a file at /Volumes/PATRIOT/plain.txt.ctxt:
@bhelx
bhelx / face_extract.rb
Last active December 30, 2015 21:09
recursively walk directory and extract faces
require "opencv"
require "fileutils"
include OpenCV
detector = CvHaarClassifierCascade::load("./haarcascade_frontalface_alt.xml")
input_dir = ARGV[0]
output_dir = ARGV[1] || 'output'
FileUtils.mkdir_p(output_dir)
@bhelx
bhelx / cedric.txt
Created February 5, 2014 19:35
Cedric Richmond on H.R. 3361
February 5, 2014
Dear Mr. bhelx,
Thank you for contacting me regarding H.R. 3361, the Uniting and
Strengthening America by Fulfilling Rights and Ending Eavesdropping,
Dragnet-collection, and On-line Monitoring (USA Freedom) Act. I
appreciate hearing from you on this issue. I am certainly concerned
@bhelx
bhelx / montyhall.py
Last active August 29, 2015 13:56
Simulation to prove answer to monty hall problem
import numpy as np
# returns a numpy array of n doors with the prize range 0-2
def simulate_prizedoors(n):
return np.random.random_integers(0, 2, size=n)
# returns a numpy array of n contestant guesses with range 0-2
def simulate_guesses(n):
return np.random.random_integers(0, 2, size=n)
@bhelx
bhelx / timed_cap.sh
Created March 13, 2014 21:15
time screen cap script ctrl+c to kill
counter=1
while true
do
sleep 1;
screencapture "$counter.jpg"
counter=$(( $counter + 1 ))
done
@bhelx
bhelx / keybase.md
Created June 13, 2014 04:24
Keybase Github Proof

Keybase proof

I hereby claim:

  • I am bhelx on github.
  • I am bhelx (https://keybase.io/bhelx) on keybase.
  • I have a public key whose fingerprint is C31E 58ED AFE3 2DE5 AC22 4461 FC6B 2D43 3F05 EFF2

To claim this, I am signing this object:

@bhelx
bhelx / counts.txt
Created August 19, 2014 22:11
calcasieu and orleans military gear
Quick counts on gear: https://github.com/TheUpshot/Military-Surplus-Gear
## ORLEANS:
RIFLE,7.62 MILLIMETER 21
TOOL KIT,GENERAL MECHANIC'S 5
FIELD PACK 5
CHARGER,BATTERY 5
OPTICAL SIGHTING AND RANGING EQUIPMENT 4
RACK,STORAGE,SMALL ARMS 4
@bhelx
bhelx / orleans_data.geojson
Created August 21, 2015 04:20
new orleans housing data since pre-katrina
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.