Skip to content

Instantly share code, notes, and snippets.

View s7v7nislands's full-sized avatar
:octocat:

s7v7nislands s7v7nislands

:octocat:
View GitHub Profile
@s7v7nislands
s7v7nislands / db.go
Created March 12, 2018 09:10 — forked from SchumacherFM/db.go
GoLang Database SQL: Selecting an unknown amount of columns from a query. Benchmark results in db_test.go
package main
import (
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"log"
)
const (
@s7v7nislands
s7v7nislands / crypto-wrong-answers.md
Created November 18, 2015 23:50 — forked from paragonie-scott/crypto-wrong-answers.md
An Open Letter to Developers Everywhere (About Cryptography)
@s7v7nislands
s7v7nislands / get_git_version
Created July 1, 2014 08:16
generate git version
#!/bin/bash
VER=`git rev-list --count HEAD`
if git status | grep -q "modified:" ; then
VER="${VER}M"
fi
VER="$VER_$(git rev-parse --head HEAD)"
GIT_VERSION=r$VER
# -*- coding: utf-8 -*-
f = open("duokan.txt")
duokan = {}
for line in f:
line = line.strip()
if len(line) == 0:
continue
code, name = line.split(" ", 1)
code = "<a href='http://book.duokan.com/invite?%s'>%s</a>" % (code, code)