Skip to content

Instantly share code, notes, and snippets.

@dohsimpson
dohsimpson / tmux-install-2-5.sh
Created October 13, 2018 23:02 — forked from wikrie/tmux-install-2-5.sh
Install Tmux 2.5 Ubuntu
#!/bin/bash
# Steps to build and install tmux from source on Ubuntu.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.5
sudo apt-get -y remove tmux
sudo apt-get -y install wget tar libevent-dev libncurses-dev
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}
" Scroll
map "j" scrollPageDown
map "k" scrollPageUp
map "left" scrollLeft
map "right" scrollRight
map "space" scrollFullPageDown
map "b" scrollFullPageUp
" Tab
map "s" nextTab
@dohsimpson
dohsimpson / better_than_self.txt
Last active April 1, 2018 21:30
Better Than Self Hosted
* BitTorrent (or http) Download: 百度盘离线下载
* Voip: GMail -> Hangout
@dohsimpson
dohsimpson / docker-tools.txt
Created March 20, 2018 12:09
Docker Tools
composerize: turn docker cli command into docker-compose file
* composerize docker run -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro --restart always --log-opt max-size=1g nginx
@dohsimpson
dohsimpson / cordova.txt
Last active January 5, 2018 15:00
Develop Mobile Apps with Cordova
## Javascript Package
* npm install/update [-g (install globally, otherwise in $PWD/node-modules dir)] PACKAGE
## Cordova CLI (ref: https://cordova.apache.org/docs/en/latest/reference/cordova-cli/)
* cordova <command> [options] -- [platformOpts]
* verbose output: -d
## Cordova Project
@dohsimpson
dohsimpson / angular.txt
Created December 7, 2017 02:48
Frontend Development with Angular
## Angluar CLI
* angular new APP_NEW
* angular generate component NEW_COMPONENT
@dohsimpson
dohsimpson / emo-aware.txt
Created December 5, 2017 20:25
Emotional Awareness (Paul Ekman) Notes
* 3 kinds of meditation: distracted(not meditating); fixed point meditation; open meditation
@dohsimpson
dohsimpson / RHCE.markdown
Last active September 24, 2017 13:33
RHCE

Useful knowledge

Command Line

  • \CMD: run CMD in a sub-shell? (useful for not using .bashrc or .zshrc which might have alias)

System Performance Tools

top: general performance monitoring

  • press 1: toggle list cpu usage by cores (useful for understanding load average and io wait)
  • < and >: sort with prev or next colume (starts from cpu)
  • f (field): add or remove column, in top view, press W to save view to ~/.toprc

Built-in Functions

about

  • version(): get the version of the DB server

datetime

  • date_trunc('second', TIMESTAMP): remove the milleseconds
Work
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCk/eYwgSbnJEH8338x77vBmZIYvt3YWLKw9U19fiqHuoO/hBlCuclaZtTXru7GTAs6RIa4AGMHnrZixsVUyA+FmGVNRTl6stgM1//+OumZbKmjqtXzr8BeFa1B3IxhPxI6I0AAn2NCuVyn97mREX1XAesKFNMgRaLhFV5/E+W3fkCV1mz1X8uJihVtZxu+fI9Gnb1KjM2ARHBZRQvghhYuCi7kIl7TlWD9DbwNCC2Yk55PRj/bN7NxZxRHdDA/9q2XZU8LJi6oDgs6hwregXgjuoXd9mdi8XhY/JK8p3xRFhfQ8IHoxQJ6X3YYgu4ITreV81MwoH1Qx6QqoJ4hPdGn user@enting
Home (https://tinyurl.com/entingkey)