Skip to content

Instantly share code, notes, and snippets.

Avatar

Lance R. Vick lrvick

View GitHub Profile
View gist:ebac4469c33314b2f56ad10525b81aad
#include "ergodox_ez.h"
#include "debug.h"
#include "action_layer.h"
#include "version.h"
#include "keymap_german.h"
#include "keymap_nordic.h"
View SprintDM (OMA-DM - even more scary than it appears)
% aapt dump xmltree SprintDM.apk AndroidManifest.xml
N: android=http://schemas.android.com/apk/res/android
E: manifest (line=2)
A: android:sharedUserId(0x0101000b)="android.uid.phone" (Raw: "android.uid.phone")
A: android:versionCode(0x0101021b)=(type 0x10)0x1
A: android:versionName(0x0101021c)="1.0" (Raw: "1.0")
A: package="com.android.sdm.plugins.sprintdm" (Raw: "com.android.sdm.plugins.sprintdm")
A: platformBuildVersionCode=(type 0x10)0x19 (Raw: "25")
A: platformBuildVersionName="7.1.2" (Raw: "7.1.2")
E: uses-sdk (line=8)
@FrankSpierings
FrankSpierings / README.md
Last active Nov 6, 2020
Linux Container Escapes and Hardening
View README.md
@aheckmann
aheckmann / parallelism.js
Created Jan 28, 2015
configurable parallelism
View parallelism.js
/**
* example of configurable parallelism
*/
// silly counter
var i = 0;
// configurable amount of work to run in parallel
var max = 1;
View README.md

agnoster-fcamblor.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@kriserickson
kriserickson / gist:8044290
Last active Dec 31, 2015
Using Ajax instead of getBase64Image to load images... See: http://jsfiddle.net/ksoncan34/DQYR2/3/
View gist:8044290
// See: http://jsfiddle.net/ksoncan34/DQYR2/3/
// Get an objectURL with an ajax object...
function getAjaxObjectUrl(url, callback, error) {
var xhr = new XMLHttpRequest(),
blob, objectURL, arrayBufferView;
xhr.open('GET', url, true);
xhr.responseType = 'arraybuffer';
xhr.addEventListener('load', function () {
@emiller
emiller / git-mv-with-history
Last active Nov 24, 2020
git utility to move/rename file or folder and retain history with it.
View git-mv-with-history
#!/bin/bash
#
# git-mv-with-history -- move/rename file or folder, with history.
#
# Moving a file in git doesn't track history, so the purpose of this
# utility is best explained from the kernel wiki:
#
# Git has a rename command git mv, but that is just for convenience.
# The effect is indistinguishable from removing the file and adding another
# with different name and the same content.
@jrom
jrom / nginx.conf
Created Feb 7, 2012
nginx hack for multiple conditions
View nginx.conf
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@lrvick
lrvick / manual_nltk_bayes_classify.py
Created Oct 6, 2011 — forked from tsoporan/manual_nltk_bayes_classify.py
Manually train an NLTK NaiveBayes Classifier
View manual_nltk_bayes_classify.py
from nltk.probability import ELEProbDist, FreqDist
from nltk import NaiveBayesClassifier
from collections import defaultdict
train_samples = {
'I hate you and you are a bad person': 'neg',
'I love you and you are a good person': 'pos',
'I fail at everything and I want to kill people' : 'neg',
'I win at everything and I want to love people' : 'pos',
'sad are things are heppening. fml' : 'neg',
@p01
p01 / LICENSE.txt
Last active Jun 26, 2019 — forked from 140bytes/LICENSE.txt
Sudoku Solver in 140bytes
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
You can’t perform that action at this time.