Skip to content

Instantly share code, notes, and snippets.

:octocat:
Focusing

Yuan He lenage

Block or report user

Report or block lenage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lenage
lenage / gist:4b9315654af7064b13b7b037135eaf88
Created Oct 26, 2018 — forked from jimbojsb/gist:1630790
Code highlighting for Keynote presentations
View gist:4b9315654af7064b13b7b037135eaf88

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

View gist:891ad2dc04d97d012a8520efa3289338
---- darwin
5885266840464780016
5891943075069952633
16834317912202361652
953572803117343050
16834310215620964175
16835115058132625402
16834309116109335964
16834320111225618074
953651967954574242
@lenage
lenage / fnv_example.go
Created Mar 31, 2017
golang fnv example
View fnv_example.go
package main
import (
"bufio"
"fmt"
"hash/fnv"
"io"
"os"
)
@lenage
lenage / ss-ignore.list
Created Jan 4, 2017
Shadowsock ignore list
View ss-ignore.list
1.0.1.0/24
1.0.2.0/23
1.0.8.0/21
1.0.32.0/19
1.1.0.0/24
1.1.2.0/23
1.1.4.0/22
1.1.8.0/24
1.1.9.0/24
1.1.10.0/23
@lenage
lenage / feature.swagger.json
Created Nov 14, 2016
swagger JSON example
View feature.swagger.json
{
"swagger": "2.0",
"info": {
"title": "feature.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
@lenage
lenage / dnscrypt.csv
Created Jul 30, 2016
DNScrypt server list
View dnscrypt.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 14 columns, instead of 6. in line 4.
Name,Full name,Description,Location,Coordinates,URL,Version,DNSSEC validation,No logs,Namecoin,Resolver address,Provider name,Provider public key,Provider public key TXT record
4armed,4ARMED,DNSCrypt Server provided by www.4armed.com,France,,https://www.4armed.com,1,yes,yes,no,51.254.115.48:443,2.dnscrypt-cert.dnscrypt.4armed.io,FD3E:5887:63EA:17A9:1AF8:4325:DE82:1507:6ED0:01AB:2F9E:55DE:689B:F491:4D8E:526E,
cisco,Cisco OpenDNS,Remove your DNS blind spot,Anycast,,https://www.opendns.com,1,no,no,no,208.67.220.220:443,2.dnscrypt-cert.opendns.com,B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79,
cisco-familyshield,Cisco OpenDNS with FamilyShield,Blocks web sites not suitable for children,Anycast,,https://www.opendns.com/home-internet-security/parental-controls/,1,no,no,no,208.67.220.123:443,2.dnscrypt-cert.opendns.com,B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79,
cisco-ipv6,Cisco OpenDNS over IPv6,Cisco OpenDNS IPv6 sandbox,Anycast,,https://www.op
@lenage
lenage / qiku360-debug.log
Last active Jul 16, 2016
qiku360 劫持 jd.com 分析
View qiku360-debug.log
!10013 [11:35:07] ~ $ curl -vvvv -L http://misc.360buyimg.com/jdf/1.0.0/unit/??base/1.0.0/base.js,basePatch/1.0.0/basePatch.js
* Trying 114.80.62.1...
* Connected to misc.360buyimg.com (114.80.62.1) port 80 (#0)
> GET /jdf/1.0.0/unit/??base/1.0.0/base.js,basePatch/1.0.0/basePatch.js HTTP/1.1
> Host: misc.360buyimg.com
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 302 Found
< Connection: close
View replace-bundle-hash.js
'use strict'
var jsonfile = require('jsonfile')
var replace = require('replace-in-file')
var fs = require('fs')
fs.readdir('dist', function(err, files) {
var htmlFiles = []
files.forEach(function(x) {
if (/\.html$/.test(x)) { htmlFiles.push('dist/' + x) }
})
@lenage
lenage / uniq-git-date.sh
Created Aug 5, 2015
List all Git commit date
View uniq-git-date.sh
git log --format='%ci' --no-merges | awk '{print $1}' | uniq | wc -l
@lenage
lenage / .vimrc
Last active Aug 29, 2015
A simple vimrc config
View .vimrc
syntax on
set encoding=utf8
set tabstop=4
set softtabstop=4
set textwidth=80
set expandtab
set number
set ruler
You can’t perform that action at this time.