127.0.0.1:6379> eval 'return redis.call("set", "item:" .. redis.call("incr","itemNCounter"), "item value")' 0
OK
127.0.0.1:6379> keys item:*
1) "item:10"
2) "item:14"
3) "item:13"
4) "item:6"
5) "item:15"
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
| # screen command aliases | |
| alias lsscreen='screen -ls' | |
| alias scrs='screen -S' | |
| alias scrx='screen -x' | |
| alias scrr='screen -r' | |
| alias scrname='f() { echo $STY; }; f' | |
| # Functions | |
| # scrkill <STY> |
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
| kill -9 `ss -lpnt | grep 8080 | sed 's/.*pid=//' | sed 's/,fd.*//'` |
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
| alias myip='f() { dig +short myip.opendns.com @resolver1.opendns.com; }; f' | |
| alias myipv6='f() { dig -t aaaa +short myip.opendns.com @resolver1.opendns.com; | |
| }; f' |
echo -n "Enter Password: " && head -1 </dev/stdin | tr -d '\n' | sha256sum | cut -d" " -f1autoload -U colors && colors
PS1="%{$fg[cyan]%}mac %{$reset_color%}% | %{$fg_bold[red]%}%n %{$reset_color%}% | %{$fg[green]%}%~ %{$reset_color%}% %F{#61BFFD}% # %{$reset_color%}% %F{#00E000}%B "root user uses sh default shell, change with
chsh -s /bin/bash rootfor root user use /var/root/.bash_profile instead of .bashrc file when login with ssh, but not sudo bash
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
| nmap --script vmware-version -p443 172.16.1.1-255 |
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
| IFACE="wlan0" | |
| NS="vpn-1" | |
| VETH="veth" | |
| VPEER="vpeer" | |
| VETH_ADDR="10.0.0.1" | |
| VPEER_ADDR="10.0.0.2" | |
| VPN_PRIVATE_NETWORK="192.168.0.0/24" | |
| VPN_IFACE="tun0" | |
| # Create namespace |
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 IFACE="eth0" | |
| export MACVTAP="macvtap1" | |
| export ADDR="192.168.1.102" | |
| export GW_ADDR="172.168.1.1" | |
| export NS="vpn" | |
| ip l a macvtap1 link $IFACE type macvtap mode bridge | |
| ip netns a $NS | |
| ip l s macvtap1 netns $NS | |
| ip netns exec $NS bash |