Skip to content

Instantly share code, notes, and snippets.

View supr's full-sized avatar

supr

  • C|^_^|Ɔ
  • GU HQ, 21 Faro System.
View GitHub Profile
@supr
supr / uz.c
Created October 11, 2012 07:07
uz nes enc
#include <sys/mman.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#define INDEX(B, P) ((P) - (B))
set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 120
set-option -g status-right-length 90
set-option -g status-left "#(~/code/tmux-powerline/status-left.sh)"
set-option -g status-right "#(~/code/tmux-powerline/status-right.sh)"
object Telugu {
def main(args: Array[String]) = {
var a = 0;
for(a <- 0x0C01 to 0x0C39) {
print(a.toChar);
}
}
}
@supr
supr / strip.py
Last active December 12, 2015 07:09
import re
import sys
f = open(sys.argv[1])
content = f.read()
for i in filter(lambda x: not re.match(r'^#', x.strip()), re.split('startup|;', content)):
if i.strip():
print "startup" + i + ";"
@supr
supr / gist:5167384
Created March 15, 2013 03:58
nginx + unicorn escaping %2B
{{EPOLLIN|EPOLLOUT, {u32=36219585, u64=36219585}}}, 512, 65000) = 1
recvfrom(3, "GET /thor/zVB1j9zL6b%2BFZQ%252FP"..., 1024, 0, NULL, NULL) = 961
socket(PF_FILE, SOCK_STREAM, 0) = 10
ioctl(10, FIONBIO, [1]) = 0
epoll_ctl(8, EPOLL_CTL_ADD, 10, {EPOLLIN|EPOLLOUT|EPOLLET, {u32=36219777, u64=36219777}}) = 0
connect(10, {sa_family=AF_FILE, path="/home/web/sock.sock"}, 110) = 0
getsockopt(10, SOL_SOCKET, SO_ERROR, [152529956721655808], [4]) = 0
writev(10, [{"GET /thor/zVB1j9zL6b+FZQ%252FPLd"..., 981}], 1) = 981
recvfrom(3, 0x7fffc49d1c3f, 1, 2, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
epoll_wait(8, {{EPOLLIN|EPOLLOUT|EPOLLHUP, {u32=36219777, u64=36219777}}}, 512, 60000) = 1
@supr
supr / matrix_telugu.html
Created March 18, 2013 00:21
Matrix Telugu
<head>
<script>
<!--
var s,q,w,h,m,p,i;
function randomFromInterval(from, to) {
return Math.floor(m() * (to - from + 1) + from);
}
@supr
supr / git_latest.sh
Created July 22, 2013 20:49
Extract latest git tag for the same commit
git log --decorate -1 | head -1 | grep -Po '(?<=tag: )[0-9.{4}]+' | head -1
# honnef.co/go/implements
../../.go/src/honnef.co/go/implements/main.go:134: scope.NumEntries undefined (type *types.Scope has no field or method NumEntries)
../../.go/src/honnef.co/go/implements/main.go:135: scope.At undefined (type *types.Scope has no field or method At)
@supr
supr / gist:7439630
Created November 12, 2013 22:06
Loki Build failure
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.246s
[INFO] Finished at: Tue Nov 12 14:06:04 PST 2013
[INFO] Final Memory: 9M/240M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project loki: Could not resolve dependencies for project com.memeo:loki:jar:0.0.1-SNAPSHOT: Could not find artifact org.mapdb:mapdb:jar:0.9.8-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
@supr
supr / build.sbt
Created November 15, 2013 22:07
Loki SBT
name := "Loki"
version := "0.0.1-SNAPSHOT"
scalaVersion := "2.10.0"
resolvers ++= Seq(
"Oracle Released Java Packages" at "http://download.oracle.com/maven",
"Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
)