-i
interface config info (useifconfig -a
on Linux for verbose interface info)-a
all ports(listening and non-listening)-l
all listening ports-t
listening TCP ports-p
display PID and program names-c
it's like watch-rn
list routes but don't resolve ip-n
numeric ports
This file contains 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
#!/bin/bash | |
set -e | |
KERNEL_VERSION=`uname -r` # make sure kernel version >= 3.10 | |
if [[ $KERNEL_VERSION != *"3.1"* ]]; then | |
echo "Kernel version must be >= 3.10" | |
fi | |
# for ubuntu 14: there's nothing required to install | |
# for ubuntu 12 |
This file contains 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
Django | |
Model: | |
Class Based Model: | |
* class MODEL(models.Model): | |
FIELD1 = models.AFIELD([FIELDNAME], [default=VALUE]) | |
def __str__(self): | |
... | |
Fields: |
This file contains 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
# execute command when file changed | |
#!/bin/bash | |
set -e | |
prev_cs=""; while true; do | |
cur_cs="`md5sum $*`" | |
if [ "$cur_cs" != "$prev_cs" ]; then | |
rake # change to your command |
This file contains 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
" Scroll | |
map "j" scrollPageDown | |
map "k" scrollPageUp | |
map "left" scrollLeft | |
map "right" scrollRight | |
map "space" scrollFullPageDown | |
map "b" scrollFullPageUp | |
" Tab | |
map "s" nextTab |
This file contains 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
Work | |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCk/eYwgSbnJEH8338x77vBmZIYvt3YWLKw9U19fiqHuoO/hBlCuclaZtTXru7GTAs6RIa4AGMHnrZixsVUyA+FmGVNRTl6stgM1//+OumZbKmjqtXzr8BeFa1B3IxhPxI6I0AAn2NCuVyn97mREX1XAesKFNMgRaLhFV5/E+W3fkCV1mz1X8uJihVtZxu+fI9Gnb1KjM2ARHBZRQvghhYuCi7kIl7TlWD9DbwNCC2Yk55PRj/bN7NxZxRHdDA/9q2XZU8LJi6oDgs6hwregXgjuoXd9mdi8XhY/JK8p3xRFhfQ8IHoxQJ6X3YYgu4ITreV81MwoH1Qx6QqoJ4hPdGn user@enting | |
Home (https://tinyurl.com/entingkey) |
\CMD
: run CMD in a sub-shell? (useful for not using .bashrc or .zshrc which might have alias)
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
This file contains 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
* `apt` cannot be followed by module name directory, have to use `name` option | |
* `import_playbook` is not a task, do not put under tasks | |
* Don't use `copy`, it is slow, use `synchronize` instead | |
* `shell` doesn't handle symlink chdir correctly, it's gonna chdir you to resolved path. |
This file contains 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
* 3 kinds of meditation: distracted(not meditating); fixed point meditation; open meditation |
OlderNewer