Skip to content

Instantly share code, notes, and snippets.

View dcousineau's full-sized avatar
:shipit:
WORKING HARD OR HARDLY WORKING AHAHAHAH

Daniel Cousineau dcousineau

:shipit:
WORKING HARD OR HARDLY WORKING AHAHAHAH
View GitHub Profile
@dcousineau
dcousineau / gulpfile.js
Created April 9, 2015 14:07
Gulp Build System
"use strict";
var _ = require('underscore')
, nodeResolve = require('resolve')
, gulp = require('gulp')
, gutil = require('gulp-util')
, browserify = require('browserify')
, watchify = require('watchify')
, babelify = require('babelify')
, source = require('vinyl-source-stream')
@dcousineau
dcousineau / README.md
Last active August 29, 2015 14:16
Reproduction of watchify bug

To reproduce

  1. Run npm install
  2. Run gulp watch-js
  3. Open test.html, notice the proper content
  4. Remove the comment on line 16 of app.jsx
  5. Refresh test.html, notice the white screen and the call stack size exceeded error in the console
@dcousineau
dcousineau / thelist.md
Last active August 29, 2015 14:13
Things To Do In DFW

Things to do in Dallas

Downtown Dallas

  • Perot Museum of Nature and Science - 5 story museum, flagship
  • Dallas World Aquarium - Awesome aquarium, but less tanks and more rain forest. Walking distance from Perot, one of my favorite places
  • 6th Floor Museum - Museum dedicated to the JFK assasination in the book loft where Lee Harvey's sniper's nest was. There's an X on the road out front where the actual assassination happened, restaurants nearby in Historic West End
  • Old Red Museum - Dallas history, across street from the 6th Floor Museum, restaurants nearby in Historic West End
  • Nasher Sculpture Center - The ceiling of the entry/lobby is a sculpture in and of itself
  • Dallas Museum of Art - Should be free now
  • Klyde Warren Park - *Cool city park built as a 'roof' over
def gc():
"""
Garbage collect cache directory ensuring oldest files are deleted until the cache limit is met
"""
# List of files in cache dir in order of oldest to newest
files = sorted(
[path(f) for f in os.listdir(cache_dir) if os.path.isfile(path(f))],
key=lambda file: os.path.getmtime(file)
)
@dcousineau
dcousineau / handlebars.js
Created October 16, 2014 17:43
Modified handlebars.js for RequireJS' r.js build tool pragmas
/*!
MODIFIED TO EXCLUDE PARSER/COMPILER WHEN FLAGS SET
BY DANIEL COUSINEAU
*/
/*!
handlebars v1.1.2
Copyright (C) 2011 by Yehuda Katz
@dcousineau
dcousineau / rev.py
Created September 30, 2014 15:34
How I made my name on Twitters
LANG=en_US.UTF-8 python rev.py A String Here | pbcopy

Keybase proof

I hereby claim:

  • I am dcousineau on github.
  • I am dcousineau (https://keybase.io/dcousineau) on keybase.
  • I have a public key whose fingerprint is 80B8 35D2 0505 75B7 3D8F FDAF 7E1B D146 2E3A DEF7

To claim this, I am signing this object:

$ wc -l eight-puzzle.dot
423362 eight-puzzle.dot
$ du -h eight-puzzle.dot
22M eight-puzzle.dot
$ sfdp -x -Goverlap=scale -Tpng eight-puzzle.dot > eight-puzzle.png
sfdp(5924,0x7fff75922300) malloc: *** mach_vm_map(size=18446744039350460416) failed (error code=3)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
out of memory
[1] 5924 segmentation fault sfdp -x -Goverlap=scale -Tpng eight-puzzle.dot > eight-puzzle.png
Vagrant.configure("2") do |config|
#...
nfs_setting = RUBY_PLATFORM =~ /darwin/ || RUBY_PLATFORM =~ /linux/
if nfs_setting
config.bindfs.bind_folder '/vagrant', '/var/www/yourproject'
config.vm.synced_folder "./", "/vagrant", id: "vagrant-root", :nfs => nfs_setting
else
config.vm.synced_folder "./", "/var/www/yourproject", id: "vagrant-root", :nfs => nfs_setting
end
end
tesseract ./one-does-not-simply_o_204186.jpg stdout
line does not simnlv
Ilull’llle flush al Am