Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
View <>
If you are suffering PTSD and feeling suicidal, because of what you did whilst serving in foreign fields, and feel you cannot live with yourself and what you did any longer, then you are ready to redeem yourself with God.
Committing suicide is not The Way and is against God's Law, for which you will find no rest, only punishment from God.
The only way to redeem yourself is to start to keep the First and Great Commandment - "And thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy mind, and with all thy strength and serve Him ONLY: this is the first Commandment" - the one you should never have broken, and which, if you had kept it, would have prevented you from being in the tragic position you are in today.
911 was an inside job. You went to war for a lie, told to you by the people you swore to defend your country against - domestic enemies/traitors. The ones who did this to you are not 5 thousand miles away and you know their names and where to find them. (See "Iraq
andreis / my-etc-hosts
Created Feb 8, 2014
My /etc/hosts for Getting Shit Done
View my-etc-hosts
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
## localhost broadcasthost
::1 localhost
View gist:9188608
#!/usr/bin/env python3
0 1 2 3 .. n-1
n = 6
3 1 2 5 1 2 array
4 0 1 2 0 0 DP array
View gist:9329283
#!/usr/bin/env python3
count = 0
def mergesort(L, l, r):
if l+1 >= r: return
mid = int((l+r+1)//2)
mergesort(L, l, mid)
#!/usr/bin/env python3
import sys
def solve(L, k):
# stuff
n = int(input())
k = int(input())
View new usage (prot)
Usage: new [options] args
-h --help
display this message
-i --install
install templates from a repository
-s --silent -f --force
supress output; silent fail, all answers Yes
-t --template
View maps-bug
Consider using 'dppx' units instead of 'dpi', as in CSS 'dpi' means dots-per-CSS-inch, not dots-per-physical-inch, so does not correspond to the actual 'dpi' of a screen. In media query expression: (min-resolution: 144dpi), (-webkit-min-device-pixel-ratio: 1.5)
event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
WebGL: INVALID_OPERATION: drawArrays: attribs not setup correctly dir/Interlaken,+Switzerland/Zurich,+Switzerland/@47.240032,8.616212,11z/dat…1m1!1s0x47900b9749bea219:0xe66e8df1e71fdc03!2m2!1d8.5391825!2d47.3686498:1
WebGL: INVALID_VALUE: texImage2D: width or height out of range dir/47.2308094,8.6342368/Nice,+France/@45.5564777,6.0122439,7z/data=!3m1!4b…m1!1s0x12cdd0106a852d31:0x40819a5fd979a70!2m2!1d7.265592!2d43.696036!3e0:1
WebGL: INVALID_VALUE: texSubImage2D: dimensions out of range dir/47.2308094,8.6342368/Nice,+France/@45.5564777,6.0122439,7z/data=!3m1!4b…m1!1s0x12cdd0106a852d31:0x40819a5fd979a70!2m2!1d7.265592!2d43.696036!3e0:1
WebGL: too many errors, n
View gist:9692295
func Tokenize(s string) []string {
out := []string{}
for l, r := 0, 0; r < len(s); {
for l = r; isSep(s[l]); l++ {
for r = l; r < len(s) && !isSep(s[r]); r++ {
out = append(out, s[l:r])
return out
andreis / tree-ser-deser.go
Last active Aug 29, 2015
A somewhat obvious solution is to emulate a heap and replace the missing nodes with "x" markers, but this performs badly on path trees (only left links). An improvement would be to replace consecutive "x"-es by "x<number>", where number==how many x-es are replaced. The solution in this gist does a depth-first traversal and prints the tree recurs…
View tree-ser-deser.go
package main
import (
View google-music-mac bug
Process: Google Music [13389]
Path: /opt/homebrew-cask/*/Google Music
Identifier: com.sajidanwar.Google-Music
Version: 1.1.1 (0)
Code Type: X86-64 (Native)
Parent Process: launchd [241]
Responsible: Google Music [13389]
User ID: 501
Date/Time: 2014-03-26 14:38:26.746 +0000