Skip to content

Instantly share code, notes, and snippets.

View ldong's full-sized avatar
❤️
Love & Peace

Alan Dong ldong

❤️
Love & Peace
  • Sunnyvale, CA
View GitHub Profile
@ldong
ldong / bash-cheatsheet.sh
Last active August 31, 2015 18:37 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@ldong
ldong / gist:4aee02964d80a13174e9
Last active August 29, 2015 14:27 — forked from kejun/gist:72112e5848f5e3921b0d
react + linear partition算法实现的图墙布局
var React = require('react');
var EventListener = require('react/lib/EventListener');
var partition = require('linear-partitioning');
var TileLayout = React.createClass({
getDefaultProps: function() {
return {
gutter: 0,
photos: []
}
#!/usr/bin/env ruby
require 'appscript'
require 'nokogiri'
require 'open-uri'
require 'clipboard'
url = ARGV.length >= 1 ? ARGV[0] : Clipboard.paste
def zhihu(doc)
@ldong
ldong / trex.html
Last active August 29, 2015 14:22 — forked from PriteshJain/trex.html
<html i18n-values="dir:textdirection;lang:language" dir="ltr" lang="en"><head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=no">
<title i18n-content="title">T-Rex Game</title>
<style>/* Copyright 2014 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. */
a {
@ldong
ldong / ruby1line.txt
Last active August 29, 2015 14:20 — forked from slyphon/ruby1line.txt
HANDY ONE-LINERS FOR RUBY November 16, 2005
compiled by David P Thomas <[email protected]> version 1.0
Latest version of this file can be found at:
http://www.fepus.net/ruby1line.txt
Last Updated: Wed Nov 16 08:35:02 CST 2005
FILE SPACING:
@ldong
ldong / a.js
Last active August 29, 2015 14:20 — forked from netwjx/a.js
// many many codes
document.write('foo bar');
document.write('</div>');
// new code
var a = 'bar.js', stamp = +new Date() + '=';
document.write('<script id="foo" src="' + a + '?' + stamp + '"></script>');
// other code
document.write('<div> other text</div>');

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: