Skip to content

Instantly share code, notes, and snippets.

@awendt
awendt / my_client.rb
Created September 8, 2011 10:07
HTTParty: Using native json parser instead of Crack
# This was proposed by @ericgj in
# https://github.com/jnunemaker/httparty/issues/75#issuecomment-1258914
# using native json parser instead of Crack
class JsonParser < HTTParty::Parser
def json
::JSON.parse(body)
end
end
@awendt
awendt / gist:2215555
Created March 27, 2012 12:53
Brew update broken
homebrew ((8d9fd73...)) $ git co master
Switched to branch 'master'
Your branch is behind 'upstream/master' by 13 commits, and can be fast-forwarded.
homebrew (master) $ brew update
Already up-to-date.
homebrew (master) $
@awendt
awendt / find_cloud.user.js
Created May 16, 2012 08:17
Greasemonkey/Tampermonkey script for Scalarium: Filter cloud list by name
// ==UserScript==
// @name Find Cloud
// @namespace Scalarium
// @include https://manage.scalarium.com/clouds
// @include https://manage.scalarium.com/
// @include https://manage.scalarium.com
// @version 2
// ==/UserScript==
(
#!/bin/bash
#===============================================================================
# FILE: infopark_system_check.sh
#
# USAGE: infopark_system_check.sh
#
# DESCRIPTION: Checks various system components on whether they are installed
# in a version needed to participate in the Infopark workshops.
#
# AUTHOR: Falk Köppe, falk.koeppe@infopark.de
# Activate the gem you are reporting the issue against.
gem 'activerecord', '4.0.2'
gem 'activesupport', '4.0.2'
require 'active_record'
require 'active_support/time_with_zone'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
@awendt
awendt / what_you_have.rb
Last active August 29, 2015 13:57
Answer for SO question 22569738
gem 'activerecord', '4.0.2'
require 'active_record'
require 'minitest/autorun'
require 'logger'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
# This connection will do for database-independent bug reports.
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:')
@awendt
awendt / flattr-tos.html
Last active August 29, 2015 14:03
Flattr TOS
<!doctype html>
<html class="no-js locale-en-gb aut11">
<head>
<meta charset="utf-8" />
<title>Terms of use - Flattr.com</title>
<link href="/favicon.ico" rel="shortcut icon" />
<link rel="apple-touch-icon" href="/_img/icons/ios-icon.png" />
@awendt
awendt / after_enter.rb
Created January 14, 2015 16:06
AASM test case
gem 'activerecord', '3.2.19'
require 'active_record'
require 'minitest/autorun'
require 'logger'
gem 'aasm', '4.0.8'
require 'aasm'
# Ensure backward compatibility with Minitest 4
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test)
@awendt
awendt / agh16-english.md
Created August 26, 2016 06:45
Links to English election programs for Berlin's #agh16

I asked this on Twitter

Gibt es eigentlich englische Parteiprogramme für die #agh16? Frage für Menschen, die wegen EU-Herkunft Wahlunterlagen erhalten haben.

— André “Andr�” Wendt (@awendt) August 25, 2016
<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>

Here are the links I received (in the order I received them):