Skip to content

Instantly share code, notes, and snippets.

View 5v3n's full-sized avatar

Sven Kräuter 5v3n

View GitHub Profile
@steveklabnik
steveklabnik / rails4gems.md
Last active December 19, 2015 13:19
Gems that may not be rails 4 compatible

Gems that need help with Rails 4

  • cucumber-rails
  • simple_form - has a 3.0.0.rc but it depends on rails 4.0.0.rc1
  • delayed_job_active_record - has a v4.0.0.beta3 so likely ready to release soon
  • spork-rails - has no indication of even a beta for rails 4
  • authlogic: binarylogic/authlogic#368
  • activeadmin/activeadmin#1963
Versioning is an anti-pattern
=============================
We often say "use the right tool for the job", but when managing change
in software systems, we always use versioning. Hypermedia APIs are
actually hindered by introducing versioning and manage change in a
different way. With that in mind, there are also a lot of options for
managing change in a Hypermedia API. We'd like to change our service and
break as few clients as possible. Versioning is only one way to manage
change, though... and my contention is that it's not appropriate for
@markpundsack
markpundsack / heroku-CVE-2013-0156.rb
Last active November 27, 2023 15:44 — forked from elliottkember/heroku-CVE-2013-0156.rb
Forked from https://gist.github.com/4489689 by elliottkember. CVE-2013-0156 is a nasty vulnerability in many versions of Rails. This script checks all your Heroku apps for this vulnerability in one quick (slow) move. More info: https://groups.google.com/forum/#!topic/rubyonrails-security/61bkgvnSGTQ/discussion
## The quick-and-nasty CVE-2013-0156 Heroku inspector!
## Originally brought to you by @elliottkember with changes by @markpundsack @ Heroku
## Download and run using:
## ruby heroku-CVE-2013-0156.rb
`heroku list`.split("\n").each do |app|
app = app.strip
# Some "heroku apps" lines have === formatting for grouping. They're not apps.
next if app[0..2] == "==="
@gcatlin
gcatlin / gist:1847248
Created February 16, 2012 19:43
Install specific version of Homebrew formula
brew update
brew versions FORMULA
cd `brew --prefix`
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions"
brew install FORMULA
brew switch FORMULA VERSION
git checkout -- Library/Formula/FORMULA.rb # reset formula
## Example: Using Subversion 1.6.17
#
@cloudhead
cloudhead / gist:1522576
Created December 27, 2011 02:41
Why I Don't Write Web Apps

Why I Don't Write Web Apps (if I can help it)

This is what happens when I try to pick a language.

Note: If I didn't think it was possible to create a development environment without any of these issues (which I consider "major" for the most part), I would not have written this list.

C/C++

  • NOTHNX.

Node.js

@rubiii
rubiii / gist:1023033
Created June 13, 2011 15:50
biersounterwegs config
results_per_page: 100
result_type: recent
search_term: 'biersounterwegs+isitbeeroclock' #find tweets containing any of these terms
twitter_timestamp: 61847783463854082 # the timestamp you want to start searching at
api_endpoint_twitter: 'http://search.twitter.com/search.json'
api_endpoint_tumblr: 'http://www.tumblr.com'
tumblr_username: 'youremail@example.com'
tumblr_password: 'bier?'
update_period: 3 #check for updates every 300 secs = 5 minutes
shouts: 'says' # will be concatenated after the username, before the message: @mr_x says: awesome things on a photo!
@tomz
tomz / tweetsentiment API examples.rb
Created November 25, 2010 15:32
Example usage of TweetSentiments.com API
require 'rubygems'
require 'json'
require 'net/http'
# Sentiments on tweets
# http://data.tweetsentiments.com:8080/api/search.json?topic=<topic to analyze>
url = "http://data.tweetsentiments.com:8080/api/analyze.json?q=i%20am%20happy"
resp = Net::HTTP.get_response(URI.parse(url))
data = resp.body
result = JSON.parse(data)
@rmanalan
rmanalan / .gems
Created January 25, 2010 20:54
Static websites using Heroku
rack-contrib
rack-rewrite