# Gemfile
gem 'minitest-reporters-turn_reporter', git: 'git://gist.github.com/692dde12f4822dc1db95.git', require: 'turn_reporter'
# test_helper.rb
require 'minitest/reporters'
# irb_debugger - A very simple debugger based on IRB | |
# | |
# As long as ruby-debug19 is broken, you can put this in your lib folder | |
# and require it in your test.rb or development.rb files. | |
# This will enable you to start an IRB session within your application, | |
# wherever you need it! Just write | |
# | |
# irb_debugger {} | |
# | |
# and it will fire IRB with full access to the current binding, i.e. |
# This snippet will provide a :nudge option for belongs_to associations, | |
# which behaves like the belongs_to :touch => true did in Rails 2.x. | |
# It will use save! instead of a sneaky update_all call, so all of your | |
# callbacks and validations will be invoked. | |
module ActiveRecord::NudgeableAssociation | |
def self.included(base) | |
base.extend ClassMethods | |
(class << base; self; end).instance_eval do |
#!/bin/bash | |
GREEN="green:health" | |
ORANGE="orange:fault" | |
usage() | |
{ | |
echo "USAGE: led (all|orange|green) (off|on|blink|heartbeat|fs) [only]" | |
exit 1 | |
} |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <time.h> | |
#include <shine/layer3.h> | |
#define SAMPLES_PER_FRAME 1152 | |
typedef struct { |
require 'redis' | |
# Redis session storage for Rails, and for Rails only. Derived from | |
# the MemCacheStore code, simply dropping in Redis instead. | |
# | |
# Options: | |
# :key => Same as with the other cookie stores, key name | |
# :host => Redis host name, default is localhost | |
# :port => Redis port, default is 6379 | |
# :db => Database number, defaults to 0. Useful to separate your session storage from other data |
require 'uri' | |
require 'net/http' | |
require 'openssl' | |
require 'base64' | |
class OoAuth | |
# request tokens are passed between the consumer and the provider out of | |
# band (i.e. callbacks cannot be used), per section 6.1.1 | |
OUT_OF_BAND = "oob" |
#!/bin/bash | |
usage() | |
{ | |
echo "USAGE: pac (search|install|update|upgrade|list|listpkg|remove|foreign|whatprovides) [packagename]" | |
} | |
PACMAN=/usr/bin/pacman | |
CMD=$1 | |
shift |
[Unit] | |
Description=Passenger Standalone Application Server | |
After=network.target | |
[Service] | |
Type=forking | |
PrivateTmp=yes | |
User=USERNAME | |
Group=GROUPNAME | |
WorkingDirectory=/apps/%i |
When starting the Märklin CS2 app on macOS Sierra, it crashes due to some libraries not being loaded in the gfpsim
executable. This is due to their load paths not being correct, which can be fixed using otool
:
install_name_tool -change /Applications/QT/4.8.5/clang_32/lib/QtGui.framework/Versions/4/QtGui @executable_path/../../../../Frameworks/QtGui.framework/Versions/4/QtGui /Applications/cs2.app/Contents/Resources/gfpsim.app/Contents/MacOS/gfpsim
install_name_tool -change /Applications/QT/4.8.5/clang_32/lib/QtCore.framework/Versions/4/QtCore @executable_path/../../../../Frameworks/QtCore.framework/Versions/4/QtCore /Applications/cs2.app/Contents/Resources/gfpsim.app/Contents/MacOS/gfpsim