Skip to content

Instantly share code, notes, and snippets.

View 5v3n's full-sized avatar

Sven Kräuter 5v3n

View GitHub Profile
# encoding: UTF-8
# Chiliproject to Redmine converter
# =================================
#
# This script takes an existing Chiliproject database and
# converts it to be compatible with Redmine (>= v2.3). The
# database is converted in such a way that it can be run multiple
# times against a production Chiliproject install without
# interfering with it's operation. This is done by duplicating
@5v3n
5v3n / chiliproject_to_redmine.rb
Last active November 10, 2015 16:09 — forked from pallan/chiliproject_to_redmine.rb
ruby 2.0.0 compatible version of @pallan 's great chiliproject to redmine migration script (https://gist.github.com/pallan/6663018)
# encoding: UTF-8
# Chiliproject to Redmine converter
# =================================
#
# This script takes an existing Chiliproject database and
# converts it to be compatible with Redmine (>= v2.3). The
# database is converted in such a way that it can be run multiple
# times against a production Chiliproject install without
# interfering with it's operation. This is done by duplicating
## 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
puts "checking #{app}"
@5v3n
5v3n / README.MD
Created December 30, 2011 21:11 — forked from wynst/README.MD
A Thor Task to unwatch *all* Github watched repositories (excluding owned) and optionally export to delicious.

A Thor Task to unwatch all Github watched repositories (excluding owned) and optionally export to delicious.

Sorry Github, for I have sinned. I use the Watch feature as a bookmarker.

Install required gems:

 `gem install thor rest-client`

Install this script in Thor:

require 'rubygems'
require 'fileutils'
require 'pathname'
require 'ruby-debug'
require 'ostruct'
require 'rest_client'
require 'json'
# multiple gems use the require tumblr, this one refers to http://github.com/mwunsch/tumblr
# note that ruby-debug and the weary lib, which makes reqs for this tumblr gem, don't play nicely together
@5v3n
5v3n / gc_test.rb
Created October 4, 2010 19:48 — forked from mattetti/gc_test.rb
# hacking some lines to get into the ruby object allocation process...
# Enable the GC profiler:
GC::Profiler.enable
# If our test create too many objects forcing the GC to run,
# we can disable the GC to properly see the object allocation
# GC.disable
def count_string_allocations
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'digest/md5'
require 'csv'
require 'json'
require 'curb'
require 'pp'
data = []