Skip to content

Instantly share code, notes, and snippets.

Avatar

Jesper Rønn-Jensen jesperronn

View GitHub Profile
View list_compromised_files.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
require "open-uri"
url= 'http://justaddwater.dk/'
#search_text = "viagra"
search_text = "bubbleGUM"
View wwwal-anondk_no_inline_s.user.js
// ==UserScript==
// @name www.al-anon.dk Remove inline scroll so that page content prints properly
// @namespace http://userscripts.org/users/103819
// @description remove scroll from al-anon pages
// @include http://al-anon.dk/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js
// ==/UserScript==
$('#framen').css({'height': 'auto', width: 'auto'});
$('<style media="print">#menu {display: none;}</style>').appendTo('head');
View svn-sync-repos.sh
#!/bin/sh
DEST=/svnroot/dk_es_virkdk
SRC_URL=https://cs-blade1.common.capgemini.dk:8443/svn/virk.dk
SRC_USER=jronn
SRC_PASS=abcd1234
DST_USER=svnsync
#svnsync initialize --source-username jronn --source-password abcd1234 file:///Users/jesper/src/v2 https://cs-blade1.common.capgemini.dk:8443/svn/virk.dk
View server.rb
#!/usr/bin/env ruby
# Modified from http://yehudakatz.com/2007/08/06/webrick-anywhere/
require 'webrick'
include WEBrick
s = HTTPServer.new(
:Port => ARGV[0] || 2000,
:DocumentRoot => Dir::pwd
)
View taglib_madness_transformation.jsp
// why should this be so many lines??
<c:choose>
<c:when test="${isKvik}">
<content:resourceBundle
resourceBundle="jahiatemplates.virk_templates"
resourceName="sidebar.kvik_mit_virk.header" defaultValue="BusinessInDenmark" />
</c:when>
<c:otherwise>
<content:resourceBundle
View validate_models.rake
#put this file in /lib/tasks and run `rake db:models:validate`
#created 2010-02-07 by Jesper Rønn-Jensen
require 'find'
namespace :db do
namespace :models do
desc 'Dumps all models into fixtures.'
task :validate => :environment do
models = []
Find.find(RAILS_ROOT + '/app/models') do |path|
We couldn’t find that file to show.
View ie_gwt_plugin_registry_key.reg
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\CLSID\{1D6156B6-002B-49E7-B5CA-C138FB843B4E}]
@="plugin Class"
"AppID"="{F9365E53-5A14-47F3-BF1D-10CAAB815309}"
[HKEY_CLASSES_ROOT\CLSID\{1D6156B6-002B-49E7-B5CA-C138FB843B4E}\Control]
[HKEY_CLASSES_ROOT\CLSID\{1D6156B6-002B-49E7-B5CA-C138FB843B4E}\InprocServer32]
@="C:\\Documents and Settings\\g43899.ND60A600\\Application Data\\Google\\Developer Plugin\\IE\\oophm.dll"
View pre-commit.bat
REM Subversion pre-commit hook for Windows machine
REM put this in your SVN repository folder /hooks/pre-commit.bat
REM we use it with svn version
REM http://stackoverflow.com/questions/869248/windows-pre-commit-hook-for-comment-length-subversion
@echo off
:: Stops commits that have empty log messages.
@echo off
setlocal
View env.rb
$: << File.expand_path(File.dirname(__FILE__) + "/../support")
#$DEBUG = true
$ROOT_PATH = File.expand_path(File.dirname(__FILE__))
require 'capybara'
require 'capybara/cucumber'
require 'spec'