Skip to content

Instantly share code, notes, and snippets.

View hazeledmands's full-sized avatar

Hazel Edmands hazeledmands

View GitHub Profile
@hazeledmands
hazeledmands / dabblet.css
Last active October 2, 2015 12:38
Example 3-pane float layout
/**
* The first commented line is your dabblet’s title
*/
#leftBar {
float: left;
width: 100px;
background: green;
}
@hazeledmands
hazeledmands / example.text
Last active December 20, 2015 20:28
Example of filepicker.io requests with `X-Forwarded-For` header resulting in 404.
> WORKING=yes node request.js
STATUS: 200
> WORKING=no node request.js
STATUS: 404
  1. Open Terminal.app, which is probably in /Applications/Utitlities/

  2. Make a new directory and go into it with the following command:

    mkdir ripples_project && cd ripples_project
  3. Download the script:

@hazeledmands
hazeledmands / setup.sh
Last active December 26, 2015 12:09
Initial, lightweight, suggested Goodeggs setup
### #### ### out-of-date! use https://github.com/goodeggs/developer-start ### ### ###
# download command line tools at https://developer.apple.com
# some tools will complain about not knowing where binaries are, until you do this:
sudo xcode-select --switch /
# set up a basic .profile
cat <<EOF > ~/.profile
export PATH="/usr/local/bin:$PATH"
@hazeledmands
hazeledmands / ui_sref_nested.coffee
Created January 15, 2014 15:50
ui-sref-nested implementation, while we wait for something to officially get rolled into angular-ui-router.
# Basically, ui-sref-active as implemented does not support nested states
# which is not particularly useful for many of the cases in this app.
#
# For more information take a look at this github issue:
# https://github.com/angular-ui/ui-router/issues/704
#
# And if it's fixed in core, then let's get rid of this directive! :D
app = angular.module 'lentilDirectives'
parseStateRef = (ref) ->
@hazeledmands
hazeledmands / amqplib_firehose.coffee
Last active August 29, 2015 14:03
a simple AMQP firehose console logger
amqplib = require 'amqplib'
exec = require('child_process').exec
child = exec('rabbitmqctl trace_on')
child.stdout.pipe process.stdout
child.stderr.pipe process.stderr
connection = null
channel = null
@hazeledmands
hazeledmands / keybase.md
Last active September 8, 2019 01:02
Keybase proof

Keybase proof

I hereby claim:

  • I am maxedmands on github.
  • I am thismax (https://keybase.io/thismax) on keybase.
  • I have a public key ASAxShkGgiqKDdYqO7kkKmrHx0pLkkKIajUcePszNW6paAo

To claim this, I am signing this object:

pivotal = require 'pivotal'
fibrous = require 'fibrous'
shelljs = require 'shelljs'
slug = require 'slug'
humanparser = require 'humanparser'
token = # ????
projectId = # ???
name = # ???
@hazeledmands
hazeledmands / install_hooks.sh
Created December 26, 2015 00:14
Pre-commit hooks to prevent .only and console.log
#!/bin/sh
# this lives in ./scripts/install_hooks.sh
SCRIPT_DIR=$(cd $(dirname "${0}") && pwd -L)
if [ "${NODE_ENV:="development"}" != "development" ]; then
echo 'Not in dev'
exit 0
fi
@hazeledmands
hazeledmands / disposer-with-timeout.js
Created May 4, 2016 18:50
Tests on bluebird disposers
const Promise = require('bluebird');
console.log('starting promise');
Promise.resolve()
.then(function () {
console.log('grabbing resource');
return Promise.using(getDisposer(), function () {
console.log('starting delay');
return Promise.delay(2000)
.then(function () {