Skip to content

Instantly share code, notes, and snippets.

@wangye
wangye / DataHelper.py
Created September 1, 2012 05:51
SQLite3数据库辅助类(查询构造器)
import sqlite3
# ***************************************************
# *
# * Description: Python操作SQLite3数据库辅助类(查询构造器)
# * Author: wangye
# * Website: http://wangye.org
# *
# ***************************************************
@pthrasher
pthrasher / beginner.vimrc.vim
Created October 22, 2012 19:26
A well commented beginner set of vim settings for your ~/.vimrc
" Beginners .vimrc
" v0.1 2012-10-22 Philip Thrasher
"
" Important things for beginners:
" * Start out small... Don't jam your vimrc full of things you're not ready to
" immediately use.
" * Read other people's vimrc's.
" * Use a plugin manager for christ's sake! (I highly recommend vundle)
" * Spend time configuring your editor... It's important. Its the tool you
" spend 8 hours a day crafting your reputation.
@nsf
nsf / explode.cc
Created October 9, 2013 08:30
C++ tuple explode
#include <cstdio>
#include <tuple>
#include <utility>
#include <type_traits>
template<int ...I> struct index_tuple_type {
template<int N> using append = index_tuple_type<I..., N>;
};
template<int N> struct make_index_impl {
using type = typename make_index_impl<N-1>::type::template append<N-1>;
anonymous
anonymous / reflection.swift
Created June 21, 2014 06:49
Reflection in Swift
import Foundation
struct Point {
var x: Int = 200
var y: Int! = 2
var z: Int? = nil
}
class CPoint {