Skip to content

Instantly share code, notes, and snippets.

View farseerfc's full-sized avatar
👶
rsync -a my-knowledge my_baby_girl:~/

Jiachen Yang farseerfc

👶
rsync -a my-knowledge my_baby_girl:~/
View GitHub Profile
@farseerfc
farseerfc / PKGBUILD
Last active February 24, 2016 16:39
PKGBUILD for powerline to merge python-powerline and python2-powerline
# Maintainer: Jiachen Yang <farseerfc@gmail.com>
# AUR Maintainer: Swift Geek
# AUR Maintainer: Timothée Ravier <tim@siosm.fr>
# AUR Maintainer: Stefan Tatschner <rumpelsepp@sevenbyte.org>
# Contributor: Swift Geek
# Contributor: Pablo Olmos de Aguilera C. pablo+aur at odac dot co
_pkgname="powerline"
pkgbase="powerline"
pkgname=("powerline" "powerline2" "python-powerline" "python2-powerline" "powerline-common" "powerline-vim" "powerline-fonts")
#include <algorithm>
#include <chrono>
#include <functional>
#include <iostream>
#include <iterator>
#include <random>
#include <type_traits>
#include <vector>
namespace chrono = std::chrono;
#include <iostream>
#include <string>
using namespace std;
template<typename T>
struct Functor{
void operator() (T t){
cout<<t<<endl;
}
};

ツールのバグを潰して、自動cache検出の結果がちょっと変わりました

JOlden Sl Sf Pure
BH 12 13 25
BiSort 5 0 5
Em3d 4 1 5
Health 8 0 8
MST 5 9 14
#!/usr/bin/env python
# encoding: utf-8
from isperdal import microwave as u
app = u('/')
posts_node = app.all(u('posts/'))
pid = posts_node(u(':pid'))
@app(u('assets/').all(u(':path'))).get()
@farseerfc
farseerfc / gist:a6309d56a60d6d006217
Last active August 29, 2015 14:13
Test MarkDown

Test MarkDown

Some _markdown_ code
@farseerfc
farseerfc / swapview.d
Created January 7, 2015 06:00
D version swapview
#!/usr/bin/dmd -run
import std.stdio, std.file, std.path, std.string, std.conv, std.math, std.container, std.algorithm;
string filesize(double size){
string units = "KMGT";
double left = size.fabs();
int unit = -1;
while(left > 1100 && unit < 3){
@farseerfc
farseerfc / swapview.js
Created December 30, 2014 19:15
async nodejs swapview.js
#!/usr/bin/env node
var sprintf = require("sprintf");
var fs = require("fs");
var async = require("async");
function filesize(size){
var units = "KMGT";
var left = Math.abs(size);
var unit = -1;
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <dirent.h>
#include <sys/stat.h>
#include <pwd.h>
#include <grp.h>
#include <time.h>
#!//usr/bin/env clang++ --std=c++11 -ferror-limit=256 -ftemplate-backtrace-limit=1 -fno-show-column -fno-show-source-location -fno-caret-diagnostics -fno-diagnostics-show-option -fcolor-diagnostics
// run in shell with:
// ./life.cpp 2>&1 | grep error
#include <type_traits>
#define CAT(a,b) CAT1(a,b)
#define CAT1(a,b) a##b
#define say(msg) \
template<int i> struct CAT(Say,__LINE__) \
{ static_assert(i!=i, msg); }; \