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
from celery import Celery | |
from typing import Any | |
app = Celery('tasks', broker='pyamqp://guest@localhost//') | |
@app.task | |
def add(x: int, y: int) -> int: | |
return x + y | |
# Usage examples |
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
## Recodring | |
# install | |
brew install asciinema | |
# record | |
asciinema rec /tmp/foo.cast | |
## Convert to GIF | |
# install |
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
let cursorTimer; | |
document.body.onmousemove = () => { | |
document.body.style.cursor = null; | |
clearTimeout(cursorTimer); | |
cursorTimer = setTimeout(() => document.body.style.cursor = 'none', 3000); | |
} |
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
#!/bin/zsh | |
find $WORK_DIR_PATH -name .git | sed s/'.git'// | xargs -P64 -I{} zsh -c 'cd {} && git fetch -j 10 &> /dev/null' | |
for DIR in $WORK_DIR_PATH/*; do | |
BASENAME=$(basename $DIR) | |
echo -n "\e[92mUpdating: \e[1m$BASENAME\e[0m " | |
pushd $DIR | |
if [[ ! -d .git ]]; then | |
echo "\e[93mnot a git repo, skipping... \e[0m" |
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
0. launch `term` | |
1. Install Homebrew (see http://brew.sh) | |
2. While Homebrew is installing this and following things, modify settings (see settings.txt) | |
3. `brew install cask` | |
4. `brew cask install iterm2` | |
5. Launch iterm2 | |
6. `brew install python git` # pre-installed versions are old, see also https://opensource.com/article/19/5/python-3-default-mac | |
6.1. export PATH=/usr/local/bin:$PATH to make homebrew stuff take precedence | |
7. `brew cask install visual-studio-code slack google-chrome` | |
8. Powerline |