Skip to content

Instantly share code, notes, and snippets.

View natlownes's full-sized avatar

Nat Lownes natlownes

View GitHub Profile
library(arrow)
library(daoviz)
library(dplyr)
library(ggplot2)
library(gt)
library(haven)
library(lubridate)
library(purrr)
library(snakecase)
library(tidyverse)
zip_code change
19102 -12
19103 -11
19104 2
19106 -6
19107 -16
19131 9
19139 4
19142 9
19143 7
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@natlownes
natlownes / bencode.py
Created September 27, 2017 02:37 — forked from rmax/bencode.py
bittorrent format encoder/decoder that I found somewhere in the internet
# The contents of this file are subject to the Python Software Foundation
# License Version 2.3 (the License). You may not copy or use this file, in
# either source code or executable form, except in compliance with the License.
# You may obtain a copy of the License at http://www.python.org/license.
#
# Software distributed under the License is distributed on an AS IS basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
@natlownes
natlownes / flask_session_injector.php
Created September 1, 2017 02:17 — forked from tspycher/flask_session_injector.php
Flask Session generation in PHP
<?php
function base64url_encode($data) {
return rtrim(strtr(base64_encode($data), '+/', '-_'), '=');
}
// payload
$data = array("username"=>"John");
$data_json = json_encode($data);
$dataz = gzcompress($data_json);
if(strlen($dataz) < (strlen($data_json) - 1))

bazel query cheatsheet

which packages depend on qtdb lib?

bazel query 'rdeps(..., //vistar/geo/qtdb:go_default_library)' --output package 

which packages does qtdb depend on?

@natlownes
natlownes / values_pointers.go
Created September 21, 2016 18:23 — forked from josephspurrier/values_pointers.go
Golang - Asterisk and Ampersand Cheatsheet
/*
********************************************************************************
Golang - Asterisk and Ampersand Cheatsheet
********************************************************************************
Also available at: https://play.golang.org/p/lNpnS9j1ma
Allowed:
--------
p := Person{"Steve", 28} stores the value
### Keybase proof
I hereby claim:
* I am natlownes on github.
* I am narf (https://keybase.io/narf) on keybase.
* I have a public key whose fingerprint is 4883 C577 22A3 0ADC F196 2484 A77D 30B9 3D83 A61A
To claim this, I am signing this object:
var fs = require("fs"),
http = require("http"),
path = require("path"),
url = require("url"),
util = require("util"),
sys = require("sys"),
zlib = require('zlib');
var port = parseFloat(process.argv[2]) || 8081;

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname