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

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 / main.css
Last active August 29, 2015 13:59 — forked from athom/qortex.com.js
/* main.css */
body { display: none}
@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
[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 / .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
@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 / gist:1115580
Created July 30, 2011 14:22
Ruby Style Guide
Original Source: https://github.com/chneukirchen/styleguide
= Christian Neukirchen's Ruby Style Guide
You may not like all rules presented here, but they work very well for
me and have helped producing high quality code. Everyone is free to
code however they want, write and follow their own style guides, but
when you contribute to my code, please follow these rules:
@lenage
lenage / commit-msg
Created August 3, 2011 07:51 — forked from mmrwoods/commit-msg
Commit and merge hooks for Github and Lighthouse
#!/usr/bin/env ruby
# When committing directly to master, look for lighthouse ticket number in commit msg and, if necessary, append in format recognised by github
# When committing to a topic/feature branch, barf if the branch name doesn't include a ticket number that can be parsed by the post-merge hook
# Note: this hook only applies when -m option used and can also be skipped by using --no-verify option
COMMIT_MASTER_STATE = 'coding-done'
branchname = `git branch --no-color 2> /dev/null`[/^\* (.+)/, 1]
@lenage
lenage / test.rb
Created August 28, 2012 17:45
Get mp3info from a fold use ruby
require 'mp3info'
dir = File.expand_path("../", __FILE__)
Dir["#{dir}/*"].each do |sub_dir|
if File.directory?(sub_dir)
Dir.entries(sub_dir).each do |file|
if file =~ /mp3/
title = file.split("-").last.sub(/.mp3/, "")
artist = file.scan(/_(\w+)/).flatten.first
Mp3Info.open( sub_dir + "/" + file ) do |mp3|
@lenage
lenage / mos_youtube.js
Created October 19, 2012 03:58
madeofsport embed youtube js
asics_mos.mos.common.video.YouTubePlayer.prototype.init = function (a) {
$(".video-overlay-share-title").text(asics_mos.mos.globalData.share.shareTitle);
asics_mos.mos.common.video.YouTubePlayer.prototype.getInstance().setContainer($("#video-player"));
asics_mos.mos.common.video.YouTubePlayer.prototype.getInstance().setOverlay($("#video-overlay"));
swfobject.embedSWF("http://www.youtube.com/v/" + a + "?enablejsapi=1&playerapiid=ytplayer&version=3&autohide=1&modestbranding=1&rel=0&showinfo=0&fs=1&hd=1", "ytplayer", this.ytPlayerWidth,
this.ytPlayerHeight, "8", null, null, {
allowScriptAccess: "always",
allowFullScreen: "true"
}, {
id: "ytplayer"