Skip to content

Instantly share code, notes, and snippets.

Jesper Rønn-Jensen jesperronn

Block or report user

Report or block jesperronn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jesperronn / osx_files_for_new_laptop
Created Feb 3, 2009
filelist for script to download and install essential sw on a new laptop
View osx_files_for_new_laptop
#list of the files I want to instal on my server
# requires previous install of XCode
# from
#recent ruby
#recent git
#and manpages
jesperronn / config.xml
Created Jul 10, 2009
View config.xml
<?xml version='1.0' encoding='UTF-8'?>
View .autotest
# cat ~/.autotest
require 'autotest_notification'
require 'autotest/fsevent'
require 'autotest/growl'
Autotest.add_hook :initialize do |autotest|
%w{.git .svn .hg .DS_Store ._* vendor}.each {|exception| autotest.add_exception(exception) }
jesperronn / expense_type.rb
Created Sep 1, 2009
grouped_select for Rails 2.3 to simplify using optgroups
View expense_type.rb
class ExpenseType < ActiveRecord::Base
validates_uniqueness_of :name
#returns grouped options split in 'popular' and 'all'
def self.groups
all_types ={|t| [,]}
['popular', all_types[0..2]],
['all', all_types]
View form_options_helper_to_add_grouped_select.rb
### lib/form_options_helper.rb
require 'action_view/helpers/form_helper'
module ActionView
module Helpers
module FormOptionsHelper
def grouped_select(object, method, choices, options = {}, html_options = {}), method, self, options.delete(:object)).to_grouped_select_tag(choices, options, html_options)
View append query to urls.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" xml:lang="da" lang="da">
<title>jquery find all a elements and append to URLs only</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script src="" type="text/javascript"></script>
<script src="" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
/* Merge an arbitrary query string into all page links.
jesperronn / capinternal_systems_login_nordic_apps.user.js
Created Sep 23, 2009
Nordic capgemini applications: Bypass the annoying redirect not happening on Firefox because of HTML in HEAD element
View capinternal_systems_login_nordic_apps.user.js
// ==UserScript==
// @name cap nordic internal systems Firefox Login error
// @namespace
// @description Bypass the annoying redirect not happening on Firefox because of HTML in HEAD element
// @include
// @include
// @include
// @include
// @include
// @include
View unused.rb
#!/usr/bin/env ruby
# THis script looks for orphan image files in a GIT project
# For now, it looks for usages in the current source files via git grep
# usage:
# unused [foldername]
# unused ../images
require 'fileutils'
View parsepage.rb
#!/usr/bin/env ruby
# Script that wraps grabbing and selecting stuff from HTML page via CSS selectors
# Created 2009-10-01 by Jesper Rønn-Jensen,
# For usage, run parsepage.rb without arguments.
# Feel free to modify, fork and improve as long as you commit your changes back to me :)
def usage
<<-EOF #.gsub(' ', '')
=== USAGE ===
You can’t perform that action at this time.