Skip to content

Instantly share code, notes, and snippets.

@sebastianwagner
sebastianwagner / localhost.rdp
Created July 5, 2013 10:15
Connect to localhost via RDP with default port
#open remmina and selct import
full address:s:localhost:3389
auto connect:i:1
compression:i:0
@sebastianwagner
sebastianwagner / virtualbox.extpack.sh
Last active December 19, 2015 09:29
Install Virtualbox Extension Pack
#!/bin/sh
# @see http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html#extpack for current version
EXTPACK='http://download.virtualbox.org/virtualbox/4.2.16/Oracle_VM_VirtualBox_Extension_Pack-4.2.16-86992.vbox-extpack'
cd $(mktemp -d) \
&& wget "$EXTPACK" \
&& sudo VBoxManage extpack install *.vbox-extpack --replace
@sebastianwagner
sebastianwagner / ruby.nanorc.diff
Created July 5, 2013 08:00
Update for ruby.nanorc to support Vagrantfile with syntax highlighting
diff --git a/ruby.nanorc b/ruby.nanorc
index b30b229..3bdfd81 100644
--- a/ruby.nanorc
+++ b/ruby.nanorc
@@ -1,6 +1,6 @@
## Here is an example for Ruby.
##
-syntax "ruby" "\.rb$"
+syntax "ruby" "Vagrantfile|\.rb$"
header "^#!.*/ruby[-0-9._]*"
@sebastianwagner
sebastianwagner / bluetooth.js.diff
Created July 2, 2013 15:16
Fix gnome3 js fuckup in bluetooth component throwing errors when logging in.
diff --git a/bluetooth.js b/bluetooth.js
index f6d2f30..8af2fd3 100644
--- a/bluetooth.js
+++ b/bluetooth.js
@@ -93,6 +93,7 @@ const Indicator = new Lang.Class({
},
_updateKillswitch: function() {
+ if(typeof GnomeBluetoothApplet == 'undefined' || typeof GnomeBluetoothApplet.killswitch_state == 'undefined') return;
let current_state = this._applet.killswitch_state;
@sebastianwagner
sebastianwagner / concat_csv_files.sh
Created June 26, 2013 09:41
Concatenate CSV files by taking heading first line of first file and appending all non-first-lines of remaining files.
#!/bin/sh
OUTFILE='outfile.csv'
#get header from first line of first file
head -n 1 result*_01_*.csv > "$OUTFILE"
#collect bodies for concatenation and append
tail --silent --lines=+2 result*_*_*.csv >> "$OUTFILE"
@sebastianwagner
sebastianwagner / zeropadding.sh
Created June 26, 2013 07:39
Generate list of numbers with zero padding in front. Adjust size of padding according to length of maximum given.
export Y=100; Z=${#Y}; for x in $(seq 1 $Y); do echo $(printf "%0"$Z"d" $x); done