Skip to content

Instantly share code, notes, and snippets.

@abhi1010
abhi1010 / grunt-hugo-lunrjs.md
Created November 4, 2015 16:17 — forked from sebz/grunt-hugo-lunrjs.md
hugo + gruntjs + lunrjs = <3 search
@abhi1010
abhi1010 / generate_diagram.py
Created September 24, 2015 04:19 — forked from jul/generate_diagram.py
building entitty relation ship diagram from a db by using introspection
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from sqlsoup import SQLSoup as sql
from sys import argv
DIGRAPH = """digraph structs {
graph [
rankdir= "LR"
bgcolor=white
]
@abhi1010
abhi1010 / typename.cpp
Last active September 2, 2015 14:19 — forked from anonymous/typename.cpp
typename usage
template <class T1>
struct OuterStruct
{
T1 mValue;
struct InnerStruct
{
T1 mValue;
};
};
@abhi1010
abhi1010 / gist:554885a7235f4047dae6
Last active September 2, 2015 14:18 — forked from anonymous/gist:0465925390f3442a7691
Tokenize a String
string strToSplit = "splitting strings, in|multiple ways";
std::vector<std::string> words;
boost::split(words, strToSplit, boost::is_any_of("\t ,|"));
std::copy (words.begin(), words.end(), std::ostream_iterator<string>(cout, "\n"));
words.clear();
std::istringstream iss(strToSplit);
std::copy(std::istream_iterator<std::string>(iss), std::istream_iterator<std::string>(), std::back_inserter(words));
std::copy (words.begin(), words.end(), std::ostream_iterator<string>(cout, "\n"));
@abhi1010
abhi1010 / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console