Skip to content

Instantly share code, notes, and snippets.

View wolever's full-sized avatar

David Wolever wolever

View GitHub Profile
CREATE OR REPLACE VIEW accounts.address_token_balances AS (
SELECT
address_hash,
token_contract_address_hash,
block_number,
LEAD(block_number, 1, 2147483647) OVER (
PARTITION BY address_hash, token_contract_address_hash
ORDER BY block_number ASC
) as next_block_number,
SUM(amount) OVER (
#!/usr/bin/env node
// My modifications to this code are public domain
const { writeSync, readFile } = require("fs")
const async_hooks = require("async_hooks")
function showStack() {
let e = new Error()
writeSync(1, e.stack.split('\n').slice(2).join('\n') + '\n')
@wolever
wolever / spectrogram.py
Last active September 28, 2015 20:29 — forked from maurisvh/spectrogram.py
ANSI art spectrogram viewer that reads audio from a microphone
#!/usr/bin/python
import numpy
import pyaudio
import sys
WIDTH = 79
BOOST = 1.0
@wolever
wolever / reverseadmin.py
Last active June 21, 2023 06:48 — forked from mzbyszewska/reverseadmin.py
Forked from https://gist.github.com/mzbyszewska/8b6afc312b024832aa85 , updated to work with Django 1.8
'''
adminreverse from here http://djangosnippets.org/snippets/2032/
changed for working with ForeignKeys
'''
'''
reverseadmin
============
Module that makes django admin handle OneToOneFields in a better way.
A common use case for one-to-one relationships is to "embed" a model
inside another one. For example, a Person may have multiple foreign

Full-stack Software Developer with a flair for the fasionable

Are you a passionate web developer who wears skinny jeans, checks Foursquare before heading out, and builds sleek, sylish apps? We are looking for you!

Who we are

We are Second Funnel - a small, growing startup making the web more visually interesting and relevant. We believe advertising currently sucks, but can be made awesome. Or at least less terrible. How? Through visuals that peek curiousity and lead to interesting, engaging content (think Pinterest meets marketing).

@wolever
wolever / MIT-LICENSE.txt
Last active June 1, 2022 05:42 — forked from niw/MIT-LICENSE.txt
Put a mac's AirPort in HostAP mode. Updated to work with OS X 10.8.
Copyright (C) 2012 Yoshimasa Niwa
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: