Skip to content

Instantly share code, notes, and snippets.

View thomasjachmann's full-sized avatar

Thomas Jachmann thomasjachmann

View GitHub Profile

Keybase proof

I hereby claim:

  • I am thomasjachmann on github.
  • I am tja (https://keybase.io/tja) on keybase.
  • I have a public key whose fingerprint is 9DDE E8EE B202 C022 2FD5 CCED E6A9 8897 1619 DC1F

To claim this, I am signing this object:

@thomasjachmann
thomasjachmann / run_failing.rb
Created June 7, 2012 15:08
run failing tests from a test/unit output (eg from rake test:units > units.txt)
require "active_support/inflector"
TESTDEF_REGEX = %r|^([a-z_]+)\(([a-zA-Z]+)\)|
test_methods = []
test_files = []
arg = ARGV.shift
if match = arg.strip.match(TESTDEF_REGEX)
test_methods << match[1]
@thomasjachmann
thomasjachmann / java_ssl_ignorance.rb
Created September 6, 2011 16:47
configures java to ignore invalid/untrusted ssl certificates
module JavaSslIgnorance
include Java
class TrustingTrustManager
include javax.net.ssl.X509TrustManager
def get_accepted_issuers; nil; end
def check_client_trusted(certs, auth_type); end
def check_server_trusted(certs, auth_type); end
end
@thomasjachmann
thomasjachmann / gist:1173001
Created August 26, 2011 08:50
restore lost git commits
#!/usr/bin/env ruby
# Helps recovering lost commits, eg when you've:
# - dropped a stash
# - reset a branch to an earlier commit, dropping the changes with --hard
#
# Shows which files have been changed in which dangling commit and prints
# the commands to view details of and restore a commit.
#
# When given a parameter, only lists commits that changed a file matching
@thomasjachmann
thomasjachmann / devise.de.yml
Created June 20, 2011 21:45 — forked from chrugail/devise.de.yml
german i18n for devise
de:
errors:
messages:
expired: "ist abgelaufen, bitte erstellen Sie einen neuen"
not_found: "nicht gefunden"
already_confirmed: "wurde bereits bestätigt, bitte melden Sie sich an"
not_locked: "ist nicht gesperrt"
not_saved:
one: "Konnte %{resource} nicht speichern: ein Fehler."
other: "Konnte %{resource} nicht speichern: %{count} Fehler."
@thomasjachmann
thomasjachmann / gist:810981
Created February 4, 2011 10:44
stack blowing Gemfile
source :rubygems
gem "rails", "~> 3.0.0"
gem "nokogiri", "1.5.0.beta.2"
gem "haml", "~> 3.0"
gem "hoptoad_notifier", "~> 2.4.2"
gem "uuidtools", "~> 2.1.1"
gem "ruby_flipper", "~> 0.0.3"
@thomasjachmann
thomasjachmann / rvm-platform-issue.sh
Created October 28, 2010 14:29
an example for the platform issue with rvm
# switch to a rvm provided ruby version - creating a new gemset just to separate things
rvm --create 1.8.7@rjb-test
# then install rjb, this should work fine, installing rjb 1.3.1
gem install rjb
# now start ruby and require "rjb"
ruby -e 'require "rubygems"; require "rjb"'
# this should result in ruby terminating with the following message: