Skip to content

Instantly share code, notes, and snippets.

Nate Guo viix

Block or report user

Report or block viix

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
@viix
viix / gist:cd0be8b0dc4b79955c88
Last active Dec 30, 2018
My cVim Configuration
View gist:cd0be8b0dc4b79955c88
unmap h
unmap l
unmap H
unmap L
map h goBack
map l goForward
map H scrollLeft
map L scrollRight
unmap K
unmap J
@viix
viix / test.js
Created Feb 2, 2016 — forked from ProfAvery/test.js
Using Underscore.js from the Node.js REPL
View test.js
/*
Per <http://stackoverflow.com/questions/5691901/using-the-underscore-module-with-node-js>,
from the Node.js REPL, use two underscores (__) instead of a single underscore (_)
because Node uses _ for the last return value.
Note that if your program is in a file, you can still use a single underscore (_).
*/
var __ = require("underscore");
__.each([1, 2, 3], function(e) { console.log(e); });
@viix
viix / Enhance.js
Created Apr 5, 2017 — forked from sebmarkbage/Enhance.js
Higher-order Components
View Enhance.js
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@viix
viix / gist:22df380b138182385b780fff7182caf3
Last active Sep 20, 2018
ubuntu essential install script
View gist:22df380b138182385b780fff7182caf3
// update nodejs
curl -sL https://deb.nodesource.com/setup_10.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt-get install -y nodejs
nodejs -v
// install yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
@viix
viix / gist:91274de984f6bef81cbdb439b05d41f2
Created Sep 21, 2018
centos essential install script
View gist:91274de984f6bef81cbdb439b05d41f2
sudo yum -y update
# nodejs
curl --silent --location https://rpm.nodesource.com/setup_10.x | sudo bash -
sudo yum install -y nodejs
node --version
# python3
sudo yum install centos-release-scl
sudo yum install rh-python36
@viix
viix / manjaro setup
Last active Feb 3, 2019
on chromebook pixel
View manjaro setup
sudo pacman-mirrors -i -c China -m rank
sudo pacman -Syyu
vim ~/.Xresources
Xft.dpi: 192
vim /etc/X11/xorg.conf.d/30-touchpad.conf
Option "NaturalScrolling" "true"
sudo pacman -S shadowsocks
You can’t perform that action at this time.