Skip to content

Instantly share code, notes, and snippets.

Yixin Wan erinwan

Block or report user

Report or block erinwan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:a6df11528f80f7dc42cf
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
View temp.html
<!-- /#study-information -->
{# <div id="participant-information">#}
{# <h3>Participant Information</h3>#}
{# <form id="participant-info-form">#}
{# <label>Gender</label>#}
{# <div class="checkbox">#}
{# <label>#}
{# <input type="checkbox" name="gender[male]" value="true" data-unchecked-value="false" checked/>Male#}
{# </label>#}
erinwan / error.js
Created Nov 15, 2015
ajax handle form error
View error.js
if (response.hasOwnProperty("errors")) {
$commentInputFormRightDiv = $("li[class='post-item post-comment active'][data-post-id='" + postID + "']");
for (var key in response["errors"]) {
erinwan /
Last active Aug 29, 2015 — forked from tsabat/
Getting oh-my-zsh to work in Ubuntu


apt-get install zsh
apt-get install git-core

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget -O - | zsh
View gist:902659def2d1415a7efa
./ createsuperuser
View gist:17c32c66c1be198fa65d
virtualenv --no-site-packages env
source env/bin/activate
pip install -r requirements.txt
python monospace/ syncdb
python monospace/ runserver
View gist:d71f7d0cbcbac7a5b3ca
dd - delete line
Ndd - delete the following N lines
View gist:8871acb59f2e330f5572

cp source destination

e.g. cp ~/Desktop/MyFile.rtf ~/Documents

erinwan / gist:3f8c7d5a0756ba38945e
Created Apr 1, 2015
prompt user for input scanner in Java
View gist:3f8c7d5a0756ba38945e
Scanner scanner = new Scanner(;
System.out.println("Please enter input");
String input = scanner.nextLine();
You can’t perform that action at this time.