Skip to content

Instantly share code, notes, and snippets.

# Terminal output control (http://www.termsys.demon.co.uk/vtansi.htm)
TC='\e['
CLR_LINE_START="${TC}1K"
CLR_LINE_END="${TC}K"
CLR_LINE="${TC}2K"
# Hope no terminal is greater than 1k columns
RESET_LINE="${CLR_LINE}${TC}1000D"
//
// Regular Expression for URL validation
//
// Author: Diego Perini
// Updated: 2010/12/05
// License: MIT
//
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it)
//
// Permission is hereby granted, free of charge, to any person
@rishabh9
rishabh9 / MailinatorAliases
Created June 13, 2016 13:02 — forked from nocturnalgeek/MailinatorAliases
A list of alternate domains that point to @mailinator.com
@binkmail.com
@bobmail.info
@chammy.info
@devnullmail.com
@letthemeatspam.com
@mailinater.com
@mailinator.net
@mailinator2.com
@notmailinator.com
@reallymymail.com

KEYBINDINGS

Byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings are:

   F2 - Create a new window

   F3 - Move to previous window

   F4 - Move to next window

F5 - Reload profile

@rishabh9
rishabh9 / Ghost - Demonize anything
Created November 18, 2016 06:08 — forked from Radamanf/Ghost - Demonize anything
This is an initialization script "/etc/init.d/ghost" file which helps you to start, stop, status executable or java -jar file.jar with nohup and & - background option, this is pretend way make a daemon, but maybe will be interested to someone. It uses PID file and checks if the process is running before every start or stop. Once it's configured …
#!/bin/bash
# Licence: GPLv3, MIT, BSD, Apache or whatever you prefer; FREE to use, modify, copy, no obligations
# Description: Bash Script to Start the process with NOHUP and & - in background, pretend to be a Daemon
# Author: Andrew Bikadorov
# Script v1.5
# For debugging purposes uncomment next line
#set -x
@rishabh9
rishabh9 / dash-avc264 command lines
Created October 25, 2017 18:11 — forked from ddennedy/dash-avc264 command lines
Use ffmpeg and mp4box to prepare DASH-AVC/264 v1.0 VoD
See my DASH-IF presentation from October, 2014:
https://s3.amazonaws.com/misc.meltymedia/dash-if-reveal/index.html#/
1. encode multiple bitrates with keyframe alignment:
ffmpeg -i ~/Movies/5D2_Portrait.MOV -s 1280x720 -c:v libx264 -b:v 1450k -bf 2 \
-g 90 -sc_threshold 0 -c:a aac -strict experimental -b:a 96k -ar 32000 out.mp4
My input was 30 fps = 3000 ms. If it were 29.97, then a GOP size of 90 frames will yield a base segment
size of 3003 milliseconds. You can make the segment size some multiple of this, e.g.: 6006, 9009, 12012.
@rishabh9
rishabh9 / ddclient.conf
Created April 8, 2020 08:20 — forked from klittlepage/ddclient.conf
A ddclient config file for use with Cloudflare. See https://gist.github.com/klittlepage/7243505 for a Cloudflare patch to the 3.8.1 version of ddclient.
daemon=1800 # check every 300 seconds
syslog=yes # log update msgs to syslog
mail=root # mail all msgs to root
mail-failure=root # mail failed update msgs to root
pid=/var/run/ddclient.pid # record PID in file.
ssl=yes # use ssl-support. Works with
# ssl-library
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
cache=/tmp/ddclient.cache