Skip to content

Instantly share code, notes, and snippets.

View fraserxu's full-sized avatar
🐢
No idea

Fraser Xu fraserxu

🐢
No idea
View GitHub Profile
@fraserxu
fraserxu / README.md
Created August 27, 2018 23:03 — forked from mchelen/README.md
JSON Resume Browser Example
@fraserxu
fraserxu / dev_setup.txt
Last active January 20, 2018 01:14 — forked from brndnblck/dev_setup.txt
Local Setup for .test Domains (dnsmasq + nginx)
sudo -v
brew install dnsmasq nginx
echo "address=/test/127.0.0.1" > /usr/local/etc/dnsmasq.conf
vim /usr/local/etc/nginx/nginx.conf
vim /usr/local/etc/nginx/servers/market-shopfront.conf
tee /usr/local/etc/nginx/nginx.conf > /dev/null << EOF
#user nobody;
@fraserxu
fraserxu / .profile
Created April 14, 2016 02:56 — forked from sindresorhus/.profile
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@fraserxu
fraserxu / README.md
Last active August 29, 2015 14:11 — forked from mbostock/.block

This variation of a line chart demonstrates how to use a linear gradient to change the color of a line based on a y-threshold. This technique is similar to the gradient encoding, but with two stops at the same offset. An alternative method is to draw multiple lines with different colors and different clipping regions.

function Animal(name) {
if (!(this instanceof Animal)) return new Animal(name);
this.name = name || 'unknown';
}
module.exports = Animal;
Animal.prototype.feed = function(food) {
food = food || 'food';
return 'Fed ' + this.name + ' some ' + food;
};
Removing write permissions of /usr/local/bin and /usr/local directories resolved this issue.
chmod go-w /usr/local/bin
sudo chmod go-w /usr/local
@fraserxu
fraserxu / gist:8020199
Created December 18, 2013 10:27 — forked from riywo/gist:5000181
# branch
$ git branch -d BRANCH # delete local BRANCH
$ git push origin :BRANCH # delete remote BRANCH
# tag
$ git tag -d TAG # delete local TAG
$ git push origin :refs/tags/TAG # delete remote TAG