Skip to content

Instantly share code, notes, and snippets.

View FingerLiu's full-sized avatar
😀
coding

FingerLiu FingerLiu

😀
coding
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>大学生超市(5号店)</title>
@FingerLiu
FingerLiu / run-docker-ss.sh
Created June 30, 2017 02:29
run ss in one line
docker run -dt --name ss -p 7890:7890 mritd/shadowsocks -s "-s 0.0.0.0 -p 7890 -m aes-256-cfb -k mypassword --fast-open"
#!/usr/bin/env python
# -*- coding: utf-8 -*-
def pretty_print_tree(tree, indent=0):
"""print pretty tree str"""
print(' '*indent + 'Tree(%s)' % (tree.key))
if tree.children:
print(' '*indent + 'children:')
for child in tree.children:
@FingerLiu
FingerLiu / inspect.go
Created January 26, 2019 14:54
inspect json and generate graphql schema
package main
/*
parse json, extract type in json and save to graphql.schema
*/
import (
"io/ioutil"
"encoding/json"
"reflect"
"fmt"
@FingerLiu
FingerLiu / squash-commits.md
Created July 17, 2019 03:18 — forked from longtimeago/squash-commits.md
How to squash commits in a GitHub pull request

How to squash commits in a GitHub pull request

o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?

Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch: