Skip to content

Instantly share code, notes, and snippets.

View mschae's full-sized avatar

Michael Schaefermeyer mschae

View GitHub Profile
@mschae
mschae / gist:9876661
Last active August 29, 2015 13:57 — forked from tonyc/gist:5989308
#/usr/bin/env bash
CHRUBY_VERSION=0.3.8
RUBY_INSTALL_VERSION=0.4.1
RUBY_VERSION=2.1.1
set -e
set -x
apt-get update
defmodule TrailingFormatCompatibilityPlug do
import Plug.Conn
def init(options), do: options
def call(conn, opts) do
conn.path_info |> List.last |> String.split(".") |> Enum.reverse |> case do
[ _ ] -> conn
[ format | fragments ] ->
new_path = fragments |> Enum.reverse |> Enum.join(".")
for event <- [:before_save, :before_update, :before_delete] do
defmacro unquote(event)(function) do
quote bind_quoted: [event: event] do
Ecto.Model.Callbacks.register_callback(__MODULE__, event, unquote(function))
def __callbacks__(:before_save), do: Keyword.get_values(@ecto_callbacks, :before_save)
end
end
end
Using worker: worker-linux-bc81d502-2.bb.travis-ci.com:travis-linux-18
system_info
Build system information
Build language: erlang
Build image provisioning date and time
Wed Feb 4 20:27:35 UTC 2015
Operating System Details
Distributor ID: Ubuntu
Description: Ubuntu 12.04 LTS
Release: 12.04
$ mix ecto.migrate
** (Postgrex.Error) ERROR (42883): function uuid_generate_v4() does not exist
lib/ecto/adapters/sql/worker.ex:26: Ecto.Adapters.SQL.Worker.query!/4
lib/ecto/adapters/sql.ex:186: Ecto.Adapters.SQL.use_worker/3
lib/ecto/adapters/postgres.ex:48: Ecto.Adapters.Postgres.execute_ddl/3
(stdlib) timer.erl:194: :timer.tc/3
lib/ecto/migration/runner.ex:22: Ecto.Migration.Runner.run/5
lib/ecto/migrator.ex:111: Ecto.Migrator.attempt/5
lib/ecto/migrator.ex:60: anonymous fn/4 in Ecto.Migrator.do_up/4
lib/ecto/adapters/sql.ex:424: Ecto.Adapters.SQL.transaction/3
application/1d-interleaved-parityfec 1d-interleaved-parityfec
application/3gpdash-qoe-report+xml 3gpdash-qoe-report+xml
application/3gpp-ims+xml 3gpp-ims+xml
application/A2L A2L
application/activemessage activemessage
application/activemessage activemessage
application/alto-costmap+json alto-costmap+json
application/alto-costmapfilter+json alto-costmapfilter+json
application/alto-directory+json alto-directory+json
application/alto-endpointprop+json alto-endpointprop+json
@mschae
mschae / frowl.rb
Created November 14, 2011 17:03
Fritz.Box Anrufmonitor
# Requires the following gems:
# - prowler (v. 1.2)
# - gdata
# Also requires prowl on your iPhone
# As always: Feel free to use as is, I'm not responsible for anything
prowl_api_key = ""
fritz_box_host = ""
google = {
:user => "",
@mschae
mschae / ical_todo.scpt
Created December 19, 2011 11:03
Alfred iCal Todo Script
on alfred_script(q)
tell application "iCal"
set newtodo to (make new todo at end of todos of calendar "Reminders")
tell newtodo
if "!!!" is in q then
set priority to high priority
else if "!!" is in q then
set priority to medium priority
else if "!" is in q then
set priority to low priority
@mschae
mschae / installation.md
Created October 1, 2012 13:42
LaTex Uni Münster installation
@mschae
mschae / installation.md
Created October 1, 2012 13:43
LaTex Uni Münster installation
  1. Download MacTex from here (I linked the Uni Münster Mirror directly since this is a Uni Münster specific guide)
  2. Run the installer
  3. Install non-free fonts that you will need for the Uni Münster template as follows:
  4. Download the installer from here
  5. cd into the directory where you downloaded the file to (you will need to open your Terminal for this): cd ~/Downloads
  6. Run the installer from the terminal: sudo texlua install-getnonfreefonts
  7. Install all fonts (because why not): getnonfreefonts --all
  8. Install slashbox as follows:
  9. Download it here
  10. Copy it to /usr/local/texlive/texmf-local/tex/latex/