Skip to content

Instantly share code, notes, and snippets.

View nwwells's full-sized avatar

Nathan Wells nwwells

View GitHub Profile
@nwwells
nwwells / gen_stats.py
Created June 13, 2012 20:31
A script to populate a mongo database with lots of statistics about nodes
from uuid import uuid1
import random
import json
import time
import sys
import pymongo
import datetime
start = time.time()
@nwwells
nwwells / keybase.md
Created October 31, 2017 08:20
keybase.md

Keybase proof

I hereby claim:

  • I am nwwells on github.
  • I am nwwells (https://keybase.io/nwwells) on keybase.
  • I have a public key ASAhdGugYvvhmp2tIm8zhhadSgs3ZLqYXMvlQJFvO9ugrAo

To claim this, I am signing this object:

@nwwells
nwwells / giving_detail.sql
Created January 15, 2016 03:24
Purpose Portfolio Giving Reports
SELECT
client.name AS "Company",
ppuser."createdAt" AS "Account Sign-up Timestamp",
"firstName" AS "First Name",
"lastName" AS "Last Name",
"workEmail" AS "Email",
"confirmedAt" AS "Account Confirmation Timestamp",
SUM(engagement.amount) AS "Paycheck Donation Amt / Charity",
portfoliounit.name AS "Charity"
FROM client
@nwwells
nwwells / _lookup.scss
Last active December 17, 2015 17:18
tuple lookup function for scss
@function lookup ($targetKey, $map, $index:2, $default:'') {
@each $entry in $map {
@if length($entry) >= $index {
$key: nth($entry, 1);
$value: nth($entry, $index);
@if $key == $targetKey {
@return $value;
}
}
}
define(function (require) {
'use strict';
var _ = require('underscore');
//functionName -> isCopy
var ARRAY_FUNCTIONS = {
'every': false,
'filter': false,
'forEach': false,
@nwwells
nwwells / patch.diff
Created October 27, 2015 19:15
Nathan's work at Symbiont.io
From 8522592042377b46150041e1f723071a9b9016a8 Mon Sep 17 00:00:00 2001
From: Nathan Wells <nwwells@gmail.com>
Date: Tue, 27 Oct 2015 12:06:34 -0400
Subject: [PATCH] renaming Content to content
---
components/record/index.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/record/index.js b/components/record/index.js
@nwwells
nwwells / rander.py
Created October 13, 2015 17:28
Coding challenge for Symbiont
#!/usr/bin/env python
import io
import os
import sys
import random
import atexit
fifo_path = "/tmp/rander.{0}".format(os.getpid())
@nwwells
nwwells / code combat 1.js
Last active October 12, 2015 20:43
A thing for Eko
// Defeat the enemy hero in under three minutes.
this.buildArmy = function() {
// Your hero can summon and command allied troops.
var buildOrder = [
"soldier",
"soldier",
"archer",
]; // "archer", "artillery", "arrow-tower"
var type = buildOrder[this.built.length % buildOrder.length];
@nwwells
nwwells / ExampleUsage.groovy
Created October 24, 2012 14:23
Grails ExportService DSL
exportService.build {
format 'excel'
out response
filename 'facilities'
extension 'xls'
objects Contact.list(params)
parameters([title: 'Facilities'])
fields {
name ('Name') {obj, val -> obj?.facility?.name}
abbreviation ('Abbr')
@nwwells
nwwells / mq.css
Created October 3, 2012 20:28 — forked from chriscoyier/mq.css
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),