Skip to content

Instantly share code, notes, and snippets.

View xeb's full-sized avatar

Mark Kockerbeck xeb

View GitHub Profile
@xeb
xeb / Vagrantfile
Last active July 12, 2016 00:32
Basic Vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
#config.vm.box = "bento/centos-7.2"
#config.vm.box_url = "https://atlas.hashicorp.com/bento/boxes/centos-7.2"
config.vm.network "forwarded_port", guest: 5000, host: 5000
config.vm.synced_folder "scripts", "/home/vagrant/scripts"
@xeb
xeb / ssh_reverse.md
Last active March 17, 2023 14:48
Reverse SSH

SSH Reverse Proxy

Some simple notes to setup SSH reverse proxy

  1. on source machine (behind the network), run: ssh -N -R 2222:localhost:22 YOURUSER@YOURSERVER

  2. on YOURSERVER, run: ssh -l SOURCEUSER -p 2222 localhost

  3. If you want to automated it, do something like...

@xeb
xeb / install-tensorflow.sh
Created December 17, 2015 18:14
TensorFlow Install on Mac OS X with sudo PIP and Six pre-installed
#!/bin/bash
sudo -H pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.6.0-py2-none-any.whl --ignore-installed six
# Modified install command from: https://www.tensorflow.org/versions/master/get_started/os_setup.html
# See: https://github.com/pypa/pip/issues/3165
# Because Apple has preinstalled the dependency Six that cannot be removed
# Some of the errors I experienced were the following:
# [Errno 1] Operation not permitted: '/tmp/pip-BriGIp-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib
@xeb
xeb / flac2mp3
Created December 7, 2015 05:10
Converts FLAC to MP3
#!/bin/bash
# from: http://apple.stackexchange.com/questions/9064/how-to-i-go-from-flac-to-mp3-using-lame-flac-using-the-terminal-alone
for f in "$@"; do
[[ "$f" != *.flac ]] && continue
album="$(metaflac --show-tag=album "$f" | sed 's/[^=]*=//')"
artist="$(metaflac --show-tag=artist "$f" | sed 's/[^=]*=//')"
date="$(metaflac --show-tag=date "$f" | sed 's/[^=]*=//')"
title="$(metaflac --show-tag=title "$f" | sed 's/[^=]*=//')"
year="$(metaflac --show-tag=date "$f" | sed 's/[^=]*=//')"
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
@xeb
xeb / payload.json
Created June 18, 2015 01:27
Payload
{ "event": { "userDefined": { "name": "Load Testing" } } }
@xeb
xeb / README.md
Last active August 29, 2015 14:07 — forked from jensgrubert/README.md
@xeb
xeb / gist:a3c4fb82c4cd864658bb
Created September 30, 2014 06:08
Force Repair Yum
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10/os/x86_64/CentOS/gmp-4.1.4-10.el5.x86_64.rpm
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10/os/x86_64/CentOS/readline-5.1-3.el5.x86_64.rpm
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10/os/x86_64/CentOS/python-2.4.3-56.el5.x86_64.rpm
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10/os/x86_64/CentOS/libxml2-2.6.26-2.1.21.el5_9.3.x86_64.rpm
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10/os/x86_64/CentOS/libxml2-python-2.6.26-2.1.21.el5_9.3.x86_64.rpm
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10/os/x86_64/CentOS/expat-1.95.8-11.el5_8.x86_64.rpm
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10/os/x86_64/CentOS/sqlite-3.3.6-7.x86_64.rpm
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10/os/x86_64/CentOS/python-sqlite-1.1.7-1.2.1.x86_64.rpm
rpm -Uvh --force http://mirror.centos.org/centos-5/5.10
@xeb
xeb / gist:6a50febeb4b5e30300ec
Created September 17, 2014 05:09
ImageMagick Convert PDF to blue
convert -density 300 input.pdf -fill blue -opaque black out2.pdf
@xeb
xeb / centos5-mono-install.sh
Last active March 13, 2017 22:26
CentOS 5/6 Mono installation
#!/bin/sh
ulimit -v unlimited
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
yum -w install bison gettext glib2 freetype fontconfig libpng libpng-devel libX11 libX11-devel glib2-devel libgdi* libexif glibc-devel urw-fonts java unzip gcc gcc-c++ automake autoconf libtool make bzip2 wget
cd /usr/local/src
wget http://download.mono-project.com/sources/mono/mono-2.10.8.tar.gz
# http://download.mono-project.com/sources/mono/mono-3.6.0.tar.bz2
tar zxvf mono-2.10.8.tar.gz
cd mono-2.10.8