My Recent Pastes (73 and counting)
Pastes by Henrik N (73 and counting)
Below are the 15 most recent pasties by Henrik N.
April 03, 2009
3:40AM EDT
by Henrik N
View all 105 lines
diff --git a/db/migrate/20090403082306_add_caller_to_view_translations.rb b/db/migrate/20090403082306_add_caller_to_view_translations.rb new file mode 100644 index 0000000..9d4f7c6 --- /dev/null +++ b/db/migrate/20090403082306_add_caller_to_view_translations.rb
November 27, 2008
3:52AM EDT
by Henrik N
View all 14 lines
require 'rubygems' require 'hpricot' html = %{Hallo <b>hallo</b>. Blöt BLÖT snö <a href="http://groda.com"><i>apa</i>!</a> <!-- apa -->} text = Hpricot(html).inner_text
November 16, 2008
5:47AM EDT
by Henrik N
View all 19 lines
// By Barney Boisvert: http://www.barneyb.com/barneyblog/2008/01/08/checkbox-range-selection-a-la-gmail/ // Modified by Henrik Nyh <http://henrik.nyh.se> 2008-11-16 to support rebinding (e.g. after sorting). (function($) { $.fn.enableCheckboxRangeSelection = function() {
November 10, 2008
3:24AM EDT
by Henrik N
View all 18 lines
Paperclip.options[:image_magick_path] = '/opt/local/bin' class Paperclip::Attachment def assign_with_mimetype_fu(uploaded_file)
October 08, 2008
2:15PM EDT
by Henrik N
View all 122 lines
#!/usr/bin/env ruby # SweDB XMLTV Grabber for EyeTV # by Henrik Nyh <http://henrik.nyh.se> 2008-03-09. # Free to modify and redistribute with credit.
September 16, 2008
3:55AM EDT
by Henrik N
View all 12 lines
module Mod def self.proc Proc.new {|x,y| puts "self = #{self}; [x,y] = #{[x,y].inspect}" } end end
September 14, 2008
7:31PM EDT
by Henrik N
View all 126 lines
#!/usr/bin/env ruby # SweDB XMLTV Grabber for EyeTV # by Henrik Nyh <http://henrik.nyh.se>. # Free to modify and redistribute with credit.
September 03, 2008
6:47AM EDT
by Henrik N
View all 9 lines
if [[ -d $TM_SELECTED_FILE ]]; then TM_PATH="$TM_SELECTED_FILE" elif [[ -f $TM_SELECTED_FILE ]]; then TM_PATH="`dirname "$TM_SELECTED_FILE"`" else
August 18, 2008
7:32AM EDT
by Henrik N
View all 19 lines
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html lang="en"> <head>
August 03, 2008
1:53PM EDT
by Henrik N
View all 51 lines
# Parses config/site.yml and creates an OpenStruct-like Site configuration object. # The site.yml file can use ERB, just like fixture yml files. # The file is expected to have a top-level key for the current Rails environment. # Its values become attribute on the Site object. # Values that have sub-keys become nested objects.
June 22, 2008
5:51AM EDT
by Henrik N
View all 8 lines
module OSA class << self; alias_method :broken_sym_to_code, :sym_to_code; end def self.sym_to_code(sym) sym = sym.to_s.gsub("_", " ").to_sym
June 22, 2008
5:29AM EDT
by Henrik N
View all 13 lines
--- rbosa.rb (saved version) +++ (current document) @@ -220,7 +220,9 @@ end
June 07, 2008
4:18PM EDT
by Henrik N
View all 29 lines
class ActiveRecord::Base def self.unprotected_create!(*args) with_unprotected_attributes { create!(*args) } end
May 24, 2008
7:03PM EDT
by Henrik N
View all 14 lines
set front_app to (path to frontmost application as Unicode text) tell app "Finder" reveal (POSIX file "/tmp/share.png" as alias) activate
