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 / vim.rb
Last active August 29, 2015 13:56 — forked from vesln/vim.rb
Vim formula for max os using homebrew
require 'formula'
class Vim < Formula
homepage ''
head ''
# This package tracks debian-unstable:
url ''
sha1 '111e9a237fa240895db013c1e546dd02580a2940'
# We only have special support for finding depends_on :python, but not yet for
Python Startup File (from
Add this file to ~/ to add history between sessions and
auto-completion via the ESC key to the interactive Python interpreter. After
adding this file, put something like the following line in your .bash_profile:
Requires a recent version of Python and the readline package, which you can
ldong /
Last active August 29, 2015 14:01 — forked from klamping/
UI Testing resources
ldong / uri.js
Last active August 29, 2015 14:02 — forked from jlong/uri.js
var parser = document.createElement('a');
// var parser = document.querySelector('CSS_SELECTOR')
parser.href = "";
parser.protocol; // => "http:"
parser.hostname; // => ""
parser.port; // => "3000"
parser.pathname; // => "/pathname/"; // => "?search=test"
parser.hash; // => "#hash"
ldong /
Last active August 29, 2015 14:03 — forked from evandrix/
A list of headless browsers

Here are a list of headless browsers that I know about:

  • [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
  • [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
  • [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
  • [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
  • [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
  • [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
  • [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
  • [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
ldong /
Last active August 18, 2019 18:26 — forked from hugorodgerbrown/
convert markdown to rst files
# This script was created to convert a directory full
# of markdown files into rst equivalents. It uses
# pandoc to do the conversion.
# 1. Install pandoc from
# 2. Copy this script into the directory containing the .md files
# 3. Ensure that the script has execute permissions
# 4. Run the script
# By default this will keep the original .md file
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
ldong /
Created August 30, 2014 03:06 — forked from btoone/


An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

class Node(object):
def __init__(self, name, lc=None, rc=None): = name = lc
self.rc = rc
self.rn = None
def link_rn(level_list):