Skip to content

Instantly share code, notes, and snippets.

View gorillamoe's full-sized avatar
:octocat:
🦍🍌

Marco Kellershoff gorillamoe

:octocat:
🦍🍌
View GitHub Profile
@gorillamoe
gorillamoe / install-tmux.sh
Created December 14, 2017 15:37 — forked from pokev25/install-tmux.sh
Install tmux 2.3 on rhel/centos 6
# Install tmux on Centos release 6.5
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
tar -xf libevent-2.0.22-stable.tar.gz
cd libevent-2.0.22-stable
./configure --prefix=/usr/local
@gorillamoe
gorillamoe / convert-webm-to-gif.bash
Created November 17, 2017 16:30
Convert webm movies to GIF
#!/bin/bash
main() {
if [[ -z $1 ]];
then
printf "Input file required\n"
exit 1
else
local inputfile="$1"
fi
@gorillamoe
gorillamoe / sane-shell-script.bash
Created March 16, 2017 14:27
Sane Shell Scripting Skeleton
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
readonly LOG_FILE="/tmp/$(basename "$0").log"
info() { echo "[INFO] $@" | tee -a "$LOG_FILE" >&2 ; }
warning() { echo "[WARNING] $@" | tee -a "$LOG_FILE" >&2 ; }
error() { echo "[ERROR] $@" | tee -a "$LOG_FILE" >&2 ; }
fatal() { echo "[FATAL] $@" | tee -a "$LOG_FILE" >&2 ; exit 1 ; }
@gorillamoe
gorillamoe / defaultOptsHandling.js
Created December 29, 2016 11:19
Sane handling of default opts
/*jshint esversion: 6 */
// Meet the AwesomeClass
class AwesomeClass {
constructor(opts) {
}
static defaultOpts(opts, default_opts) {
var new_opts = default_opts;
if (opts) {
for (var property in default_opts) {
if (default_opts.hasOwnProperty(property)) {
@gorillamoe
gorillamoe / vim-noexpandtab-2.vim
Created May 23, 2016 07:55
Vim settings for 2 spaces tabs
set tabstop=4 softtabstop=0 noexpandtab shiftwidth=2 smarttab
@gorillamoe
gorillamoe / chrome-apps-launcher.desktop
Created November 18, 2015 08:21
Google Chrome / Chromium Apps Launcher Gnome (Linux) Shortcut (put in ~/.local/share/applications/)
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=Chrome Apps Launcher
Comment=Unofficial desktop shortcut for Google Chrome's / Chromium's App Launcher
Exec=/usr/bin/chromium --show-app-list
Icon=/usr/share/icons/hicolor/256x256/apps/chromium.png
Terminal=false
Type=Application
Categories=Network;
@gorillamoe
gorillamoe / wajit-vanilla-mode.js
Created December 4, 2014 16:46
Wajit - Vanilla Mode Example
// require https://code.jquery.com/jquery-2.1.1.min.js
// require js/my_cool_script.js
var moo = function () {
window.console.log(jQuery);
}
moo();
@gorillamoe
gorillamoe / 10-evdev.conf
Created October 20, 2014 10:38
Linux X11 German Umlauts with US International Keyboard
#/etc/X11/xorg.conf.d/10-evdev.conf
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "Xkb_Layout" "us"
@gorillamoe
gorillamoe / metacity-theme-3.xml
Last active August 29, 2015 14:06
Remove Titlebar from Gnome 3 Window when maximized
<!-- Edit /usr/local/themes/[YOUR CURRENT THEME NAME]/metacity-1/metacity-theme-3.xml -->
<frame_geometry name="max" has_title="false" title_scale="medium" parent="normal" rounded_bottom_right="false" rounded_bottom_left="false" rounded_top_left="false" rounded_top_right="false">
<distance name="left_width" value="0"/>
<distance name="right_width" value="0"/>
<distance name="bottom_height" value="0"/>
<distance name="left_titlebar_edge" value="0"/>
<distance name="right_titlebar_edge" value="0"/>
<distance name="title_vertical_pad" value="0"/>
<border name="title_border" left="0" right="0" top="0" bottom="0"/>
@gorillamoe
gorillamoe / install-vim-centosdrecksdings.sh
Created June 25, 2014 16:50
Install/Build Vim Latest/Full in CentOS
#!/bin/sh
yum install \
ruby \
ruby-devel \
python \
python-devel \
lua \
lua-devel \
gcc \