This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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); }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unmap h | |
unmap l | |
unmap H | |
unmap L | |
map h goBack | |
map l goForward | |
map H scrollLeft | |
map L scrollRight | |
unmap K | |
unmap J |