Skip to content

Instantly share code, notes, and snippets.

View natlownes's full-sized avatar

Nat Lownes natlownes

View GitHub Profile

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?

library(arrow)
library(daoviz)
library(dplyr)
library(ggplot2)
library(gt)
library(haven)
library(lubridate)
library(purrr)
library(snakecase)
library(tidyverse)
setopt No_X_Trace;
setopt No_Verbose;
if ! type redisplay 2>/dev/null 1>/dev/null; then
declare -x PS1
declare -x PS2;
declare -x PS3;
declare -x PS4;
setopt Prompt_Percent
zip_code change
19102 -12
19103 -11
19104 2
19106 -6
19107 -16
19131 9
19139 4
19142 9
19143 7
@natlownes
natlownes / gist:6554889
Created September 13, 2013 19:20
rebuild CtrlP cache and ctags
augroup RebuildCaches
autocmd!
autocmd BufWritePost * call RebuildTags()
autocmd FocusGained * CtrlPClearCache
autocmd BufWritePost * CtrlPClearCache
augroup END
function! RebuildTags()
let cmd = 'ctags -R'
let output=system(cmd)
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))
@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
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.onload = function() {
var hrefs = jQuery('a[href*=".wav"]');
for(var i=0;i<hrefs.length;i++) {
var uri = (hrefs[i].href);
var audio = jQuery('<audio autoplay loop src="' + uri + '">')
jQuery('body').append(audio);
};
}