Skip to content

Instantly share code, notes, and snippets.

Benjamin Eckel bhelx

Block or report user

Report or block bhelx

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 urban_access_test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bhelx
bhelx / recurly_bot.ex
Created Nov 30, 2016
Elixir Plug Cowboy Example
View recurly_bot.ex
defmodule RecurlyBot do
use Application
# See http://elixir-lang.org/docs/stable/elixir/Application.html
# for more information on OTP Applications
def start(_type, _args) do
import Supervisor.Spec, warn: false
# Define workers and child supervisors to be supervised
children = [
@bhelx
bhelx / fetch.rb
Last active May 9, 2017
Recursively fetch Craigslist apartments using their map's json api
View fetch.rb
REGION = 'neworleans'
BASE_URL = "https://#{REGION}.craigslist.org"
parse_listings = lambda do |url|
results = JSON.parse Net::HTTP.get(URI(url))
results.first.each do |item|
if item.key? 'GeoCluster'
parse_listings.call("#{BASE_URL}#{item['url']}")
@bhelx
bhelx / process.js
Last active Mar 1, 2016
Fetch and resize geojson images concurrently using async.js
View process.js
"use strict";
let im = require('imagemagick');
let async = require('async');
let fs = require('fs');
let request = require('request');
let path = require('path');
let os = require('os');
let fetchAndProcess = (task, done) => {
@bhelx
bhelx / test.php
Last active Sep 16, 2017
TLS Low Level Testing. You should expect to see it print TLS version 1.2.
View test.php
<?php
// This example is for testing php with libcurl
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://www.howsmyssl.com/a/check");
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
View nola_housing_data.csv
zip 2015 2014 2005 pct_change_2014_2015 pct_change_2005_2015
70128 73 74.0 88.0 -1.35135135135 -17.0454545455
70129 75 89.0 68.0 -15.7303370787 10.2941176471
70126 73 72.0 71.0 1.38888888889 2.81690140845
70127 63 69.0 71.0 -8.69565217391 -11.2676056338
70122 121 115.0 92.0 5.21739130435 31.5217391304
70124 189 184.0 158.0 2.71739130435 19.6202531646
70005 204 193.0 168.0 5.69948186528 21.4285714286
70002 126 122.0 122.0 3.27868852459 3.27868852459
70006 121 121.0 120.0 0.0 0.833333333333
@bhelx
bhelx / orleans_data.geojson
Created Aug 21, 2015
new orleans housing data since pre-katrina
View orleans_data.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bhelx
bhelx / counts.txt
Created Aug 19, 2014
calcasieu and orleans military gear
View counts.txt
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 / keybase.md
Created Jun 13, 2014
Keybase Github Proof
View keybase.md

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 / timed_cap.sh
Created Mar 13, 2014
time screen cap script ctrl+c to kill
View timed_cap.sh
counter=1
while true
do
sleep 1;
screencapture "$counter.jpg"
counter=$(( $counter + 1 ))
done
You can’t perform that action at this time.