sudo apt-get update
sudo apt-get install smstools curlsudo nano /usr/local/bin/pushsms
#!/bin/bashsudo apt-get update
sudo apt-get install smstools curlsudo nano /usr/local/bin/pushsms
#!/bin/bash| #!/bin/bash | |
| # | |
| # Created by Felipe Machado - 2016/02/14 | |
| # | |
| # A retry command for bash | |
| # Retries the given command up to MAX_RETRIES, with an interval of SLEEP_TIME | |
| # between each retry. Just put it on your bash_profile and be happy :) | |
| # Usage: | |
| # retry [-s SLEEP_TIME] [-m MAX_RETRIES] COMMAND_WITH_ARGUMENTS | |
| # |
| import click | |
| from pathlib import Path | |
| from subprocess import call, check_output | |
| from tqdm import tqdm | |
| @click.command() | |
| @click.argument('directory', type=click.Path(exists=True)) | |
| @click.option('--recursive', is_flag=True, help='Recursive') | |
| @click.option('--file-ext', help='File format to process') | |
| def main(directory, file_ext='mp4', recursive=False): |
| # Prefix Key | |
| # Default: C-b | |
| # C-b is inconvenient to reach on the keyboard and also vim uses it. | |
| # Download via wget https://gist.github.com/andrestaffe/d6c8acd9a79b0b86d64e85106b485b42/raw/969ecbd0759a6786a9564a828c333a41f8eb4be3/tmux.conf -O .tmux.conf | |
| # This frees the key for other functions | |
| unbind-key C-b | |
| # C-y is very convenient to reach on a german keyboard, YMMV. | |
| # I don't like to use C-a because it's a readline binding to go to the |
| #!/bin/bash | |
| # This script will compile and install a static ffmpeg build with support for nvenc in ubuntu. | |
| # See the prefix path and compile options if edits are needed to suit your needs. | |
| # NOTE: This build is made to target Ubunutu 16.04 Data-Science Azure VMs - With nVidia 418.xx drivers and CUDA SDK 9.0. | |
| # It also relies on a hack described in https://trac.ffmpeg.org/ticket/6431#comment:7 to make glibc dynamic still. | |
| # Long story short, you need to edit your ffmepg's configure script to avoid failures on libm and libdl. | |
| # in function probe_cc, replace the _flags_filter line to: _flags_filter='filter_out -lm|-ldl' |
| import os, sys, glob | |
| from PIL import Image | |
| # define path from input | |
| path = os.path.normpath(sys.argv[1]) | |
| # loop fir given path and PNG files | |
| for infile in glob.glob(os.path.join(path, "*.png")): | |
| file, ext = os.path.splitext(infile) | |
| # define JPG as output |