Homebrew is a package management system for OS X. You can read more about it here, or simply run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"to install it.
| function video_to_gif { | |
| local input_video_path="$1" | |
| local output_gif_path="$2" | |
| local fps="${3:-10}" | |
| local scale="${4:-1080}" | |
| local loop="${5:-0}" | |
| ffmpeg -i "${input_video_path}" -vf "setpts=PTS/1,fps=${fps},scale=${scale}:-2:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop $loop "${output_gif_path}" | |
| } |
Homebrew is a package management system for OS X. You can read more about it here, or simply run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"to install it.
| #!/bin/bash | |
| ### | |
| ### Backing up data from everywhere to local HDD | |
| ### duplicity, rsync, scp | |
| ### | |
| echo "Today is: `date`" |
| #!/bin/bash | |
| ### | |
| ### Ubuntu, OpenVPN, Shadowsocks | |
| ### Be smart, stay secure! | |
| ### | |
| echo " Establishing OpenVPN full-routing tunnel to New-York, USA..." | |
| myip="$(dig +short myip.opendns.com @resolver1.opendns.com)" |
| #!/bin/bash | |
| ### | |
| ### Automatic updates | |
| ### Debian 8+ / Ubuntu 16.04+ | |
| ### Full system upgrade with APT | |
| ### Python 2.x/3.x upgrade installed packages with PIP | |
| ### | |
| echo " " |
##Domain
We need some records on our domain (mydomain.com) DNS for connections. Add these records:
t1 IN NS t1ns.mydomain.com. ; note final the dot!
t1ns IN A OUR_SERVER_IP
##Server
| #!/usr/bin/env python | |
| """ | |
| Synchronise block devices over the network | |
| Copyright 2006-2008 Justin Azoff <justin@bouncybouncy.net> | |
| Copyright 2011 Robert Coup <robert@coup.net.nz> | |
| License: GPL | |
| Getting started: | |
| # Kernel sysctl configuration file for Linux | |
| # | |
| # Version 1.12 - 2015-09-30 | |
| # Michiel Klaver - IT Professional | |
| # http://klaver.it/linux/ for the latest version - http://klaver.it/bsd/ for a BSD variant | |
| # | |
| # This file should be saved as /etc/sysctl.conf and can be activated using the command: | |
| # sysctl -e -p /etc/sysctl.conf | |
| # | |
| # For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details. |
| # | |
| # /etc/sysctl.conf - Configuration file for setting system variables | |
| # See /etc/sysctl.d/ for additional system variables. | |
| # See sysctl.conf (5) for information. | |
| # | |
| #kernel.domainname = example.com | |
| # Uncomment the following to stop low-level messages on console | |
| #kernel.printk = 3 4 1 3 |