Skip to content

Instantly share code, notes, and snippets.

View beaugunderson's full-sized avatar
type type type

Beau Gunderson beaugunderson

type type type
View GitHub Profile
@beaugunderson
beaugunderson / .vimrc
Created July 31, 2011 01:40
Prompt to edit a corresponding .scss file when opening a .css file in vim
function! EditScss()
" The current file
let file = expand("%")
" The current file's basename plus .scss
let scss = expand("%:r") . ".scss"
" If the file exists
if filereadable(scss)
" Prompt the user and store the user's choice (1-indexed) in a variable
#!/usr/bin/env node
var inquirer = require("inquirer"),
request = require("request"),
qs = require('querystring'),
fs = require('fs');
var request_token_url = 'https://api.twitter.com/oauth/request_token',
access_token_url = 'https://api.twitter.com/oauth/access_token';
@deoxxa
deoxxa / parallelworlds.json
Created March 7, 2013 20:44
SimCity (2013) Studies
// http://worlds.simcity.com/parallelworlds.json
//
// Intercepting this request and changing the "Desc" field does nothing to the
// game's UI. The name in the interface seems to come from looking up the "id"
// field against a list of names stored internally. Probably because of locale
// stuff.
//
// Note the hidden servers!
{
[{"index": 0, "id": "<redacted>", "habit": {"week": "2013-08-26", "goal_units": "timedelta", "daily_scores": [{"total_points": 128, "state": 13, "score": 1439, "goal": 720.0, "last_timestamp": "2013-08-26T23:59:00+5:00", "base_points": 25, "day": "monday"}, {"total_points": 125, "state": 13, "score": 1438, "goal": 720.0, "last_timestamp": "2013-08-27T23:59:00+5:00", "base_points": 25, "day": "tuesday"}, {"total_points": 125, "state": 13, "score": 1439, "goal": 720.0, "last_timestamp": "2013-08-28T23:59:00+5:00", "base_points": 25, "day": "wednesday"}, {"total_points": 125, "state": 13, "score": 1430, "goal": 720.0, "last_timestamp": "2013-08-29T23:59:00+5:00", "base_points": 25, "day": "thursday"}, {"total_points": 125, "state": 13, "score": 1440, "goal": 720.0, "last_timestamp": "2013-08-30T23:59:00+5:00", "base_points": 25, "day": "friday"}, {"total_points": 125, "state": 13, "score": 1434, "goal": 720.0, "last_timestamp": "2013-08-31T23:59:00+5:00", "base_points": 25, "day": "saturday"}, {"total_points": 1
@mbostock
mbostock / .block
Last active February 8, 2016 23:46
Polymaps + D3, Part 2
license: gpl-3.0
@trutheum
trutheum / Trutheum.sol
Last active July 12, 2017 06:27
This is a preliminary test of Trutheum (trutheum.com)
pragma solidity ^0.4.13;
// Trutheum Contract v0.01
contract Trutheum {
// Contributer is any person who transfers funds
// to this contract. They have a right to vote for
// the truth that they believe answers the RFT.
struct Contributor {
uint weight;
bool voted;
@trevnorris
trevnorris / all-my-knowledge.md
Last active December 9, 2017 00:39
Here's a rundown of everything I use to do performance analysis in Node.

Introduction

Here is a collection of tips and tricks I've picked up about doing performance analysis on Node. Included is a build script that should get a base install of Ubuntu fully functional and ready for all the things we'll be going through.

The script pulls a lot of code from the latest master of each repository. So it's possible that something may fail, but to date I haven't had any issues.

First, go ahead and run the script. Then go take a nice long break. It'll

@airhadoken
airhadoken / twittercard.js
Last active February 4, 2022 18:41
Making twitter cards and also getting data back from them later, in NodeJS.
var T = require("twit");
var Q = require("q");
// key and secret for Twitter for iPhone.
// A whitelisted app is needed to access the cards API; you can't just create your own currently.
var TWITTER_CONSUMER_KEY = "IQKbtAYlXLripLGPWd0HUA";
var TWITTER_CONSUMER_SECRET = "GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU";
// These you will have to fill in yourself by authorizing Twitter for iPhone for your account.
// How to get the access tokens through OOB authorization is outside the scope of this snippet.
var TWITTER_ACCESS_TOKEN = "";
@riobard
riobard / tcpdump.txt
Last active August 12, 2022 08:19
Poem lines broadcast by my ISP-provided fiber optical modem
# My ISP-provided fiber optical modem broadcasts a line of a poem every ten seconds. Here's the tcpdump of the complete poem.
# The optical modem is made by Shanghai Nokia-Bell Co.,Ltd and its model number is G-140W-UD. It's provided by my ISP, China Unicom in Shenzhen.
$ tcpdump -i vlan10 ether proto 0x8300
15:59:00.720301 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72:
0x0000: 0000 0000 e4ea 8386 d93c 5468 6520 6461 .........<The.da
0x0010: 7920 4920 6c6f 7374 206d 7920 7665 7279 y.I.lost.my.very
0x0020: 2066 6972 7374 2074 6f6f 7468 2c00 0000 .first.tooth,...
0x0030: 0000 0000 0000 0000 0000 ..........
15:59:10.740778 00:00:00:00:00:12 (oui Ethernet) > Broadcast, ethertype Unknown (0x8300), length 72:
@rahuldamodar94
rahuldamodar94 / gist:6bdd022f3457934f2a104fd5f4bb45e4
Created December 16, 2020 02:21
0x V3 deployment on Matic Testnet (Mumbai - 80001) and Matic Mainnet (137)
"80001":{
"erc20Proxy": "0x0b47076aaa5246411458fcf85494f41bbfdb8470",
"erc721Proxy": "0xff7ca10af37178bdd056628ef42fd7f799fac77c",
"erc1155Proxy": "0x53d791f18155c211ff8b58671d0f7e9b50e596ad",
"zrxToken": "0x5af2b282779c7d4ffc69ca4e6e16676747f5c56b",
"etherToken": "0x5b5e11e4818cceba3e82ca9b97cd0ab80be75ad3",
"exchange": "0x533dc89624dcc012c7323b41f286bd2df478800b",
"erc20BridgeProxy": "0x5638a4b19f121adc4436de3f0e845173b33b594c",
"forwarder": "0x6dcf02d3a963f22dbf85c4025b86a834fef16c15",
"coordinatorRegistry": "0x6f5b9e0456c4849224c7b59dc15f05c48641c4e3",