Skip to content

Instantly share code, notes, and snippets.

View zhuqling's full-sized avatar

zhuqling zhuqling

  • @xinsailei
  • Guangzhou
View GitHub Profile
@zhuqling
zhuqling / a_golang_job_queue.md
Created March 7, 2016 08:19 — forked from dryaf/a_golang_job_queue.md
Job queues in Golang
@zhuqling
zhuqling / golang_job_queue.md
Created March 7, 2016 08:19 — forked from harlow/golang_job_queue.md
Job queues in Golang
@zhuqling
zhuqling / Install_tmux
Created January 18, 2016 09:44 — forked from simme/Install_tmux
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@zhuqling
zhuqling / index.html
Created January 12, 2016 01:41 — forked from anonymous/index.html
Dot progress // source http://jsbin.com/povohu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dot progress</title>
</head>
<body>
<span id="loading-dots"></span>
<script id="jsbin-javascript">
var x = 0;
@zhuqling
zhuqling / index.html
Created January 12, 2016 01:40 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/juxefe
<!DOCTYPE html>
<html>
<head>
<script src="http://fb.me/react-with-addons-0.13.3.js"></script>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<meta charset="utf-8">
<title>Apple site nav menu</title>
<style id="jsbin-css">
html {
@zhuqling
zhuqling / index.html
Created January 12, 2016 01:37 — forked from anonymous/index.html
Pulse button // source http://jsbin.com/soligo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Pulse button</title>
<style id="jsbin-css">
body, html {
height: 100%;
background: #fff;
}
@zhuqling
zhuqling / index.html
Created January 12, 2016 01:36 — forked from anonymous/index.html
JS Bin // source http://jsbin.com/pitiqu
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
body {
font-family: 'fira-sans', sans-serif;
}
span.nowrap {
@zhuqling
zhuqling / index.html
Created January 12, 2016 01:34 — forked from anonymous/index.html
Shadow footer // source http://jsbin.com/yohiqe
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Shadow footer</title>
<style id="jsbin-css">
footer {
position: fixed;
bottom: 0;
@zhuqling
zhuqling / trim_enabler.txt
Last active September 4, 2015 02:25 — forked from return1/trim_enabler.txt
TRIM Enabler for OS X Yosemite 10.10.3
#
# UPDATE for 10.10.4: please consider this patch obsolete, as apple provides a tool called "trimforce" to enable trim support for 3rd party SSDs
# just run "sudo trimforce enable" to activate the trim support from now on!
#
# Original version by Grant Parnell is offline (http://digitaldj.net/2011/07/21/trim-enabler-for-lion/)
# Update July 2014: no longer offline, see https://digitaldj.net/blog/2011/11/17/trim-enabler-for-os-x-lion-mountain-lion-mavericks/
#
# Looks for "Apple" string in HD kext, changes it to a wildcard match for anything
#
# Alternative to http://www.groths.org/trim-enabler-3-0-released/
@zhuqling
zhuqling / gist:ae8c43fb69605e2e55db
Last active August 29, 2015 14:28 — forked from akisute/gist:1141953
Create an animated gif file from images in iOS
#import <UIKit/UIKit.h>
#import <ImageIO/ImageIO.h>
#import <MobileCoreServices/MobileCoreServices.h>
- (void)exportAnimatedGif
{
UIImage *shacho = [UIImage imageNamed:@"shacho.png"];
UIImage *bucho = [UIImage imageNamed:@"bucho.jpeg"];
NSString *path = [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:@"animated.gif"];