sudo apt-get install python3-pip
sudo pip3 install virtualenv
#!/bin/bash | |
# Destroy everything | |
# https://www.youtube.com/watch?v=DBwgX8yBqsw | |
# | |
# Stop all containers | |
docker stop $(docker ps -a -q) | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
server { | |
listen 8000 default_server; | |
listen [::]:8000 default_server; | |
# SSL configuration | |
# | |
# listen 443 ssl default_server; | |
# listen [::]:443 ssl default_server; | |
# | |
# Note: You should disable gzip for SSL traffic. |
# near: get non-html files 'near' an html file (ex: an image located outside) (--near) | |
httrack --near -%v -z -%k -%B -B -u2 -%u -O ./. 'http://blog.eon01.com' |
1) Install inotifywait | |
sudo apt install inotifywait | |
2) Use inotifywait to sync your folders to S3 | |
s3folder = "<your_s3_fodler_path>" | |
s3bucket = "s3://<your_s3_bucket_name>" | |
while inotifywait $s3folder; do aws s3 sync $s3folder $s3bucket --delete; done |
ffmpeg -i <video.mp4|flv> -vf scale=640:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -loop 0 - gif:- | convert -layers Optimize - <output.gif> |
apt install python3-pip | |
pip3 install --upgrade pip | |
pip3 install virtualenvwrapper | |
mkdir $HOME/PYTHON_ENV | |
export WORKON_HOME=$HOME/PYTHON_ENVS | |
source /usr/local/bin/virtualenvwrapper.sh | |
mkvirtualenv --python=$(which python3) $1 |
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
def reltime(date, compare_to=None, at='@'): | |
r'''Takes a datetime and returns a relative representation of the | |
time. | |
:param date: The date to render relatively | |
:param compare_to: what to compare the date to. Defaults to datetime.now() | |
:param at: date/time separator. defaults to "@". "at" is also reasonable. | |
>>> from datetime import datetime, timedelta | |
>>> today = datetime(2050, 9, 2, 15, 00) | |
>>> earlier = datetime(2050, 9, 2, 12) |