Skip to content

Instantly share code, notes, and snippets.

@gavincyi
gavincyi / gist:0a54be29080b47b962063e078edd05bf
Last active October 16, 2017 02:45
Install Vim 8 with Python, Python 3, Ruby and Lua support on Ubuntu 16.04
cd workspace
git clone https://github.com/vim/vim
cd vim
git pull && git fetch
#In case Vim was already installed
cd src
make distclean
cd ..
@gavincyi
gavincyi / tmux-cheatsheet.markdown
Created August 18, 2017 03:16 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
#!/bin/bash
cd /var
touch swap.img
chmod 600 swap.img
dd if=/dev/zero of=/var/swap.img bs=1024k count=4000
mkswap /var/swap.img
swapon /var/swap.img
@gavincyi
gavincyi / rb_close_all.py
Created March 22, 2017 06:14
Submitted all Review Board Request.
#!/usr/python
import urllib.request, base64
import json
import argparse
import sys
def url_request(user, pwd, url, method, data={}):
# Generate authentication

Bitcoin Algo Trading Team

This one page is to cover the team objective and tasks.

Objective

  • Create an automatic trading system on market making and arbitrage strategies

  • Create a legal funding pool mechanism for funding and profit allocation

// you can use includes, for example:
#include <algorithm>
#include <string>
#include <iostream>
using namespace std;
#define vii vector<pair<int, int>>
#define pii pair<int, int>
#define g0( a ) get<0>( a )
#define g1( a ) get<1>( a )
// you can use includes, for example:
#include <algorithm>
using namespace std;
#define vii vector<pair<int, int>>
#define pii pair<int, int>
#define g0( a ) get<0>( a )
#define g1( a ) get<1>( a )
int solution1(vector<int> &A, vector<int> &B, vector<int> &C) {
// write your code in C++11 (g++ 4.8.2)
@gavincyi
gavincyi / pre-push.sh
Created August 4, 2016 05:24 — forked from vlucas/pre-push.sh
Prevent Pushes Directly to Master
#!/bin/bash
# @link https://gist.github.com/mattscilipoti/8424018
#
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
@gavincyi
gavincyi / p4 grep
Created June 1, 2016 01:57
p4 grep
p4 dirs //depot/MMA/interfaces/"*" | sed 's/$/\/.../' | xargs p4 grep -e SimIOCMarketRoutes
@gavincyi
gavincyi / FreeMemory
Last active March 22, 2016 23:40
Free memory
free
dd if=/dev/zero of=/var/swap.img bs=1024k count=1000
mkswap /var/swap.img
swapon /var/swap.img
free