View togif.sh
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 | |
mkdir -p output | |
palette="/tmp/palette.png" | |
for i in *.mp4 | |
do | |
f=$(basename -- ${i%.*}) | |
echo "Working on $f..." | |
filters="fps=10,scale=560:-1:flags=lanczos" | |
ffmpeg -v warning -i "$f.mp4" -vf "$filters,palettegen" -y "$palette" |
View slice-video.sh
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 | |
# Usage: ./slice-for-stories.sh Video-to-Slice.mp4 | |
fname=$1 | |
# Get length | |
length=$(ffmpeg -i $fname 2>&1 | grep "Duration"| cut -d ' ' -f 4 | sed s/,// | sed 's@\..*@@g' | awk '{ split($1, A, ":"); split(A[3], B, "."); print 3600*A[1] + 60*A[2] + B[1] }') | |
let fcount=length/20 | |
echo "${fname} is ${length}s long. About to create ${fcount} files..." |
View public-keys
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6Bq51gq3eSCGdQkQrz9elYciCtqgL8PY5+sA1o+SoGxDnqFj8SI2I47XlltuXxpOBqWwsN1UtI0GYdxtBIdz69h/rM2OBSWVOd6RgJIjNRw/T7klEZlxqrTWNjjmmRox/UcvYgFCE0jIa11keZCrvrZzduEEPGmISBfg/OSz2TBVaQlelWbxUQ402Esi1ORKXr3ipgeavtFC6LRO09T6jUqoIy7spiZi0xAJoU33Y6voTGG7tRNlvh7c0w+WrnDhsPByiHaD7zQRER+BRatPqYg4vI1n3rpEWwKbmJTCNDtM9dmfZ3xkdU2Uut3alAZ9CONb1vJ/aOm4aTCuSPh2H benjiao@ws1 | |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCo6JvW+SxlrMx4HWwHtkYg8HshpGXQrMyceZZ+uclnUAPQS5X+JH1NpgN9sNmr2vtKAmJzBc0CLSK1PyTKyATt5I5ZhVSmr2yQImZiRrusShSryRDLGr9ntBO+RTHiZemTllmyr9UVp7j/zth9l2GW6bh1iQfbkkaCeTUOSRP9wGw5DYLBMkfeM4XF6vgRC4LRZWAqZzXWUVJikjI4dCq6lnrVOoTHCmMynbd/eKzE1vZ3dXzbQPyQEQQEYMta58hT4DNN05Lk9gVccrKgGYx+TDi8nuTO9pZddqYQf9oTpN4AMZ9h3us0PbZvBP9KzSVRCWjIVfwg9dCbuJIccmPn benjiao@ws2 | |
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCodAKviJ4rWaGL88dOr/iUB3YhwoettLxMlINS9OUgoFSkNgrl0VwHx2srk0NKSQBR2o+oBjJDWyCnHdNrM4PhOMI/5jtUQ8X7TaBMBcoQzaL716S+DFt1OK9ECn3xv9SVaEJIw98pencS1Z/nku80j5ux89ZWOpNd2gqolU8ak0UejRB0I8U4QO5n05QPmLI43eAidy |
View requests-with-retry.py
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
import requests | |
from requests.adapters import HTTPAdapter | |
from requests.packages.urllib3.util.retry import Retry | |
with requests.Session() as s: | |
retries = Retry( | |
total=10, | |
backoff_factor=0.2, | |
status_forcelist=[500, 502, 503, 504]) |
View xenial64-conda.sh
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
# Basic Stuff | |
apt-get update | |
apt-get dist-upgrade -y | |
apt-get upgrade -y | |
locale-gen en_PH.UTF-8 | |
apt-get install ntp -y | |
apt-get install htop -y | |
apt-get install git -y |
View xenial64-python.sh
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
# Basic Stuff | |
apt-get update | |
apt-get dist-upgrade -y | |
apt-get upgrade -y | |
locale-gen en_PH.UTF-8 | |
apt-get install ntp -y | |
apt-get install htop -y | |
apt-get install git -y |
View pibot.py
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
import re | |
import time | |
import json | |
import psutil | |
from slackclient import SlackClient | |
slack_client = SlackClient("xoxb-103696790404-jv1XDqw2w5dezNWZy0K5ykdG") | |
View taiga-config.py
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
from .common import * | |
MEDIA_URL = "http://example.com/media/" | |
STATIC_URL = "http://example.com/static/" | |
ADMIN_MEDIA_PREFIX = "http://example.com/static/admin/" | |
SITES["front"]["scheme"] = "http" | |
SITES["front"]["domain"] = "example.com" | |
SECRET_KEY = "theveryultratopsecretkey" |
View taiga-io.sh
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
# Install Taiga.io on Ubuntu 16.04 | |
# based on: https://taigaio.github.io/taiga-doc/dist/setup-production.html | |
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && \ | |
sudo locale-gen en_PH.UTF-8 && \ | |
sudo apt-get install ntp -y && \ | |
sudo apt-get install htop -y && \ | |
sudo apt-get install git -y | |
sudo dpkg-reconfigure tzdata |
View prep-ubuntu-14.04.sh
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
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && \ | |
sudo locale-gen en_PH.UTF-8 && \ | |
sudo apt-get install ntp -y && \ | |
sudo apt-get install htop -y && \ | |
sudo apt-get install git -y | |
sudo dpkg-reconfigure tzdata | |
sudo fallocate -l 4G /swapfile && \ | |
sudo chmod 600 /swapfile && \ |
NewerOlder