Skip to content

Instantly share code, notes, and snippets.

@fiedl
fiedl / i3-ports-mavericks.md
Last active August 29, 2015 14:01
Installing IceCube's I3_PORTS on Mac OS X 10.9 Mavericks

Installing IceCube's I3_PORTS on Mac OS X 10.9 Mavericks

Important: Installing the icecube tools through I3_PORTS is no longer the preferred way for Mac OS. The necessary tools should be installed using homebrew instead.

Unfortunately, the current guides are out of date at the moment. For an update on this, check the IRC chatroom: #icecube on irc.efnet.net. A good irc client for Mac OS is Colloquy.

For the meantime, I have prepared another gist guiding through the installation of the icecube simulation software.

@fiedl
fiedl / genie.cmake
Created June 13, 2014 11:22
Genie Cmake configuration Hack for homebrew on Mac OS X 10.9.
#
# Copyright (C) 2011
# Claudio Kopper <claudio.kopper@icecube.wisc.edu>
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@fiedl
fiedl / Window-2-3.md
Last active August 29, 2015 14:06
Mac OS Window Management: Snap windows 2/3 of the screen when pressing Shift_R.
  • Use Karabiner to route the right shift key to another key, e.g. F18.
  • Use Apple Script in Spark or another hotkey manager to resize the window.
@fiedl
fiedl / pr.md
Last active August 29, 2015 14:11 — forked from piscisaureus/pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

Remove osxfuse if installed via homebrew:
> brew uninstall osxfuse
Install osxfuse binary and choose to install the MacFUSE compatibility layer:
http://sourceforge.net/projects/osxfuse/files/latest/download?source=files
Reboot (optional but recommended by osxfuse)
Install ntfs-3g via homebrew:
> brew update && brew install ntfs-3g
@fiedl
fiedl / prepend.rb
Created March 5, 2015 14:45
Prepend: Using `super` in a re-opened ruby class.
# Original class
class Foo
def piep
"sag mal"
end
end
# Methods to add/override
module FooExtension
def piep
@fiedl
fiedl / README.md
Created October 22, 2015 23:58
Fixing time zone issue in specs between 0:00 and 2:00

Some of our specs failed between 0:00 and 2:00, but succeeded otherwise.

The issue had been that to_date itself does not consider the timezone, such that we had to replace expressions like

I18n.localize @some_datetime.to_date

with

// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
# nas mount
mount -t smbfs -o username=Sebastian,password=... //nas/Sebastian /mnt
# TODO: insert version with separate credentials file (box: blue-lucid)
@fiedl
fiedl / categorize_csv.rb
Created August 21, 2013 13:25
Ruby script to **split a csv file** into separate files categorized by a category column.
#!/usr/bin/env ruby
#
# categorize_csv.rb
# Fiedlschuster, 2013-08-21
#
# Usage: ruby categorize_csv.rb --column 2 data.csv
# This splits the data.csv file into separate files,
# one for each category found in column 2 (numbered 1,2,3,...),
# and outputs to data.category_name.csv
#