Skip to content

Instantly share code, notes, and snippets.

View lenage's full-sized avatar
:octocat:
Focusing

Yuan He lenage

:octocat:
Focusing
View GitHub Profile
@lenage
lenage / qiku360-debug.log
Last active July 16, 2016 04:17
qiku360 劫持 jd.com 分析
!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
'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 August 5, 2015 02:33
List all Git commit date
git log --format='%ci' --no-merges | awk '{print $1}' | uniq | wc -l
@lenage
lenage / .vimrc
Last active August 29, 2015 14:25
A simple vimrc config
syntax on
set encoding=utf8
set tabstop=4
set softtabstop=4
set textwidth=80
set expandtab
set number
set ruler
[Script Info]
; Script generated by Aegisub 3.2.2
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
ScaledBorderAndShadow: yes
YCbCr Matrix: None
[Aegisub Project Garbage]
@lenage
lenage / convert_favicon
Created April 1, 2015 14:31
Image magick create an favicon icon
convert flux_logo.svg -bordercolor white -border 0 \ git:master
\( -clone 0 -resize 16x16 \) \
\( -clone 0 -resize 32x32 \) \
\( -clone 0 -resize 48x48 \) \
\( -clone 0 -resize 64x64 \) \
-delete 0 -alpha off -colors 256 favicon.ico
@lenage
lenage / main.css
Last active August 29, 2015 13:59 — forked from athom/qortex.com.js
/* main.css */
body { display: none}

Keybase proof

I hereby claim:

  • I am lenage on github.
  • I am lenage (https://keybase.io/lenage) on keybase.
  • I have a public key whose fingerprint is 62BE B389 A73F 0C95 63DF 3DDC 5B18 B824 66D3 6984

To claim this, I am signing this object:

@lenage
lenage / csv_to_yaml.rb
Created July 8, 2013 01:42
Convert csv file to YAML
require 'csv'
class String
def unquote
self.gsub(/^"|"$/, '')
end
end
# first line contains the field names
#line = gets
@lenage
lenage / dnspod.py
Created March 27, 2013 15:56
Update DNSPod recored use Python
#!/usr/bin/env python2
#-*- coding:utf-8 -*-
import httplib, urllib
import socket
import time
import sys
#replace with your sub_domain and your record_id, which can get it by API Record.List