(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
import os | |
import sys | |
if sys.platform() == "win32": | |
def clear(): os.system("cls") | |
elif sys.platform() == "linux2": | |
def clear(): os.system("clear") | |
elif sys.platform() == "cygwin": | |
def clear(): os.system("clear") | |
elif sys.platform() == "darwin": |
import sys | |
import time | |
def spinning_cursor(): | |
while True: | |
for cursor in '|/-\\': | |
yield cursor | |
def start(): | |
spinner = spinning_cursor() |
import time | |
import sys | |
toolbar_width = 40 | |
current = 0 | |
for i in range(1, 101): | |
time.sleep(0.1) |
#define swap(a, b) do { \ | |
typeof(a) temp = a; \ | |
a = b; \ | |
b = temp; \ | |
} while (0); |
#!/bin/bash | |
find . -name '<include files>' -not -path '<exclude dir>' | xargs wc -l |
#!/bin/bash | |
printf "Local: %s\n" "$(ifconfig enp3s0 | grep 'inet ' | awk '{ print $2}')" | |
printf "Global: %s\n" "$(dig +short myip.opendns.com @resolver1.opendns.com)" |
git config --global alias.lg "log --graph --abbrev --decorate --pretty=format:'%h %C(bold blue)%s%C(reset) %C(yellow)%d%C(reset) %C(dim green)%an %C(dim white)%ar%n' --all" | |
git config --global alias.lgg "log --graph --abbrev --decorate --pretty=format:'%h %C(bold blue)%s%C(reset) %C(yellow)%d%C(reset) %C(dim green)%an %C(dim white)%ar%n%b%n' --all" |
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add - | |
add-apt-repository "$(wget -qO- https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list)" | |
apt-get update | |
apt-get install -y mssql-server |
#!/bin/sh | |
curl 'https://corona-stats.online/serbia?source=2' -s | | |
sed 's/\x1b\[[0-9;]*m//g' | # Remove ANSI color codes | |
grep 'Serbia' | | |
sed 's/\s*//g ; s/║//g ; s/│/;/g' | | |
awk -F';' '{ if ($4 == "") {$4 = 0;} if ($6 == "") {$6 = 0;} print "😷 " $3 " (" $4 ") 💀 " $5 " (" $6 ") 👍 " $7 }' |