Skip to content

Instantly share code, notes, and snippets.


Chris Houhoulis houhoulis

  • Boston, Massachusetts, U.S.
View GitHub Profile
houhoulis / trash_image_capture_dupes.rb
Created Sep 26, 2020
Find dupes that Apple's "Image" is creating when importing photos from my camera, & move to trash. Compare dupes to the previous dupe (or original) via md5.
View trash_image_capture_dupes.rb
require 'digest'
def filenames
def digest filename
import requests
import json
from import Client
HEADERS = {'Accept': 'application/vnd.github.inertia-preview+json'}
GH_TOKEN = "XXX" # Your auth token from
TW_SID = "XXX" # Your Account SID from
TW_TOKEN = "XXX" # Your Auth Token from
houhoulis / cities.json
Created Jun 1, 2020 — forked from Miserlou/cities.json
1000 Largest US Cities By Population With Geographic Coordinates, in JSON
View cities.json
"city": "New York",
"growth_from_2000_to_2013": "4.8%",
"latitude": 40.7127837,
"longitude": -74.0059413,
"population": "8405837",
"rank": "1",
"state": "New York"
houhoulis /
Last active Apr 30, 2018
How define a method with a default argument of `nil` that can detect whether `nil` or no argument was passed in?

How define a method which takes an optional argument w/ a default value, but you have to distinguish whether the default arg or no arg was passed in?

class Foo
  def bar(a = "whatevs")
    # Was "whatevs" passed in, or no arg?

Two very different examples that distinguish between nil and no arg:

houhoulis / settings.js
Last active Oct 13, 2018
ms vs code customizations
View settings.js
"[rust]": {
"editor.tabSize": 4,
"editor.insertSpaces": true
"bracketPairColorizer.forceUniqueOpeningColor": false,
"bracketPairColorizer.forceIterationColorCycle": false,
"bracketPairColorizer.colorMode": "Consecutive",
//"bracketPairColorizer.scopeLineCSS": ["{color}"],
houhoulis / requirements_spec.rb
Created Mar 7, 2018
hypothetical feature spec for displaying auto-assign field in `spec/features/requirements_spec.rb`
View requirements_spec.rb
require 'rails_helper'
RSpec.describe "Requirements" do
# ... skipping over what's already in this file....
describe "requirement index page" do
it "renders auto_assign field" do
event = create :event
task = create :task, event: event
houhoulis / open_grapher.html
Created Mar 23, 2017
Highchart graph from URL search parameters
View open_grapher.html
<!DOCTYPE html>
<meta charset="utf-8">
<script src=""></script>
<script src=""></script>
<div id="container"></div>
You can’t perform that action at this time.