Skip to content

Instantly share code, notes, and snippets.

View xeb's full-sized avatar

Mark Kockerbeck xeb

View GitHub Profile
@xeb
xeb / download.sh
Created December 22, 2013 04:40
Download all URLs from a file
while read p; do
wget $p
done < urls
@xeb
xeb / gist:8746403
Created February 1, 2014 00:58
DynamicXml
public class DynamicXml : DynamicObject
{
XElement _root;
private DynamicXml(XElement root)
{
_root = root;
}
public static DynamicXml Parse(string xmlString)
{
@xeb
xeb / convert.sh
Created April 5, 2014 23:36
Covert PDF Color
convert -density 300 ReturnLabel2.pdf -fill blue -opaque black output.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
@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 / 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 / README.md
Last active August 29, 2015 14:07 — forked from jensgrubert/README.md
@xeb
xeb / payload.json
Created June 18, 2015 01:27
Payload
{ "event": { "userDefined": { "name": "Load Testing" } } }
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
@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/[^=]*=//')"