Skip to content

Instantly share code, notes, and snippets.

View silveraid's full-sized avatar
🤠

Frank Felhoffer silveraid

🤠
View GitHub Profile
@silveraid
silveraid / youtube_autodl.sh
Last active February 8, 2019 17:11
Simple tool to automate fetching videos on MacOSX from YouTube
#!/bin/bash
# Simple tool to automate fetching videos on MacOSX from YouTube
# Installing dependencies:
# pip install youtube-dl
# brew install libav
echo "Resetting clipboard ..."
echo "-" | pbcopy

Debian 9 + Dahdi 2.11 + libpri 1.6 + Wanpipe 7 + Asterisk 13

1. Installing pre-requisites

1.1. Installing dev packages

apt-get update
apt-get install -y build-essential flex bison libreadline-dev libssl-dev gettext libtiff-dev uuid-dev libjansson-dev libxml2-dev libsqlite3-dev doxygen libncurses-dev libtool automake autoconf linux-headers-4.9.0-4-amd64 linux-headers-4.9.0-4-common linux-kbuild-4.9 wget vim
@silveraid
silveraid / CentOS-Docker
Created October 27, 2017 12:09
Creating minimal CentOS docker image from scratch
# Create a folder for our new root structure
$ export centos_root='/centos_image/rootfs'
$ mkdir -p $centos_root
# initialize rpm database
$ rpm --root $centos_root --initdb
# download and install the centos-release package, it contains our repository sources
$ yum reinstall --downloadonly --downloaddir . centos-release
$ rpm --root $centos_root -ivh centos-release*.rpm
$ rpm --root $centos_root --import $centos_root/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
# install yum without docs and install only the english language files during the process
# List of maps
listener = [{
instance_port = "${var.backend_port}"
instance_protocol = "${var.backend_protocol}"
lb_port = 80
lb_protocol = "http"
},{
instance_port = "${var.backend2_port}"
instance_protocol = "${var.backend2_protocol}"
lb_port = 8080
@silveraid
silveraid / Jenkinsfile
Last active September 21, 2017 20:15
Jenkinsfile reference
# IF statements
# Note: a variable which has value is true
if (var1) {}
else if (var1 || var && var3) {}
else if (var2) {}
else {}
@silveraid
silveraid / .bashrc
Created September 1, 2017 16:48 — forked from miracle2k/.bashrc
Convert an existing docker container into a "docker run" command line
# Convert an existing docker container into a "docker run" command line.
#
# This is useful when trying to debug containers that have been created
# by orchestration tools.
#
# Install jq: stedolan.github.io/jq/
function format_run() {
cid=$1