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 | |
#--- | |
# Converts all .mp4 files in a directory to GIF | |
# NOTE: Filenames must have no spaces | |
#--- | |
mkdir -p output | |
palette="/tmp/palette.png" | |
for i in *.mp4 | |
do |
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..." |
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 |
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]) |
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 |
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 |
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") | |
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" |
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 |
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