Last Update: May 13, 2019
Offline Version
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
| export PS1='\u@mac \W:~\$ ' | |
| alias rm='rm -i' | |
| alias cp='cp -i' | |
| alias mv='mv -i' | |
| alias ls='ls -Ga --color' | |
| alias ll='ls -l' | |
| alias llrt='ll -rth' | |
| alias lls='ll -l --block-size=MB' | |
| alias la='ls -a' |
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 config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
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
| # Restart NetworkManager | |
| nmcli networking off | |
| nmcli networking on | |
| # Restart Wireless interface via ifconfig | |
| # Replace wlo1 with your wifi network name (check with ifconfig) | |
| sudo ifconfig wlo1 down | |
| sudo ifconfig wlo1 up |
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 tools for displaying Htmls | |
| from IPython.display import display, HTML | |
| # Import library for string diff | |
| import diff_match_patch as dmp_module | |
| def print_text_diff(text1, text2): | |
| # Compute the diff | |
| dmp = dmp_module.diff_match_patch() | |
| diff = dmp.diff_main(text1, text2) | |
| # Return a pretty Html sequence |
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
| # Check what process is occupying port 8080 | |
| netstat -apln | grep 8080 | |
| # Display information about current process | |
| ps -ef | grep <process-id> |
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
| #!/usr/bin/env bash | |
| # Usage: | |
| # source ./set_env.sh | |
| # Reference: | |
| # https://stackoverflow.com/a/20909045 | |
| # Export env vars | |
| export $(grep -v '^#' env_vars.env | xargs) |
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
| 1. Install steps from https://github.com/marsqing/libinput-three-finger-drag | |
| 2. Run `sudo apt-get install -y libinput-tools` | |
| 3. Run `sudo apt-get install -y libxdo-dev` | |
| 4. Create custom libinput-gestures at `~/.config/libinput-gestures.conf` | |
| 5. Test by running binary from step 1 |
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
| # Reference: https://github.com/adap/flower/tree/main/examples/embedded_devices#setting-up-a-raspberry-pi-3b-or-4b | |
| # make sure your OS is up-to-date | |
| $ sudo apt-get update | |
| # get the installation script | |
| $ curl -fsSL https://get.docker.com -o get-docker.sh | |
| # install docker | |
| $ sudo sh get-docker.sh |
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
| # Ref: https://github.com/gpakosz/.tmux/issues/171#issuecomment-406661487 | |
| printf '%b\n' '\ue0b0\ue0b1\ue0b2\ue0b3' |
OlderNewer