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
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
#!/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
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
set nocompatible | |
" Syntax Highlighting | |
filetype indent plugin on | |
set syntax=on | |
" Use case insesitive search | |
set ignorecase | |
set smartcase |
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
#!/bin/bash | |
set -e | |
# ---------------------------------------------------------------------------------------- | |
# Installs OpenCV 2.4.11 | |
# Note: Tested on Ubuntu 14.04 | |
# | |
# Resources: | |
# | |
# http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/ |
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
from flask import session | |
from flask import request | |
from flask import redirect | |
from functools import wraps | |
app = Flask(__name__) | |
app.secret_key = '86A611287CE4DC76545575687F84F' | |
def login_required(test): |
NewerOlder