This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#list of the files I want to instal on my server | |
# requires previous install of XCode | |
# from http://developer.apple.com/technology/xcode.html | |
#recent ruby | |
ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p72.tar.gz | |
#recent git | |
http://kernel.org/pub/software/scm/git/git-1.6.1.2.tar.gz | |
#and manpages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version='1.0' encoding='UTF-8'?> | |
<project> | |
<actions/> | |
<description></description> | |
<logRotator> | |
<daysToKeep>5</daysToKeep> | |
<numToKeep>-1</numToKeep> | |
</logRotator> | |
<keepDependencies>false</keepDependencies> | |
<properties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) } | |
false | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExpenseType < ActiveRecord::Base | |
validates_uniqueness_of :name | |
#returns grouped options split in 'popular' and 'all' | |
def self.groups | |
all_types = self.all.map{|t| [t.name, t.id]} | |
[ | |
['popular', all_types[0..2]], | |
['all', all_types] | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 = {}) | |
InstanceTag.new(object, method, self, options.delete(:object)).to_grouped_select_tag(choices, options, html_options) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" lang="da"> | |
<head> | |
<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="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> | |
<script src="jquery.ba-url.js" type="text/javascript" charset="utf-8"></script> | |
<script type="text/javascript" charset="utf-8"> | |
/* Merge an arbitrary query string into all page links. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name cap nordic internal systems Firefox Login error | |
// @namespace http://userscripts.org/users/103819 | |
// @description Bypass the annoying redirect not happening on Firefox because of HTML in HEAD element | |
// @include http://applications.capgemini.se/applications/employee/employee.cfm | |
// @include http://applications.capgemini.se/applications/skills/skills.cfm | |
// @include http://applications.capgemini.se/applications/Staffing/staffing.cfm | |
// @include http://applications.capgemini.se/applications/common/common.cfm | |
// @include http://applications.capgemini.se/Applications/ADManager/ADManager.cfm | |
// @include http://applications.capgemini.se/Applications/Approve/Approve.cfm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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, www.justaddwater.dk | |
# | |
# 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 === |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# set -x | |
# Script will copy contents of current dir (except the files defined in _exclude_list) | |
# into it's own separate folder. It will also expand symlinks so that windows users | |
# can use the script directly | |
# Created 2009-10-14 by Jesper Rønn-Jensen | |
echo ".* | |
_*" > _exclude_list.txt | |
cd `dirname $0` |
OlderNewer