My Recent Pastes (40 and counting)

Pastes by Mislav (40 and counting)

Pages: 1 3

Below are the 15 most recent pasties by Mislav.

September 10, 2008
4:33PM EDT
by mislav

From c5e49cdc44a1c884db421cd1af99e109ac607866 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Mislav=20Marohni=C4=87?= <mislav.marohnic@gmail.com>
Date: Wed, 10 Sep 2008 22:32:10 +0200
Subject: [PATCH] support "_:;,." characters in ticket names

September 08, 2008
6:46PM EDT
by mislav

## use named routes in global space
module Mislav
  include ActionController::UrlWriter
  default_url_options[:host] = "mislav.caboo.se"
end

August 31, 2008
2:34PM EDT
by mislav

class MyModel
  def save(_ = true)
    # your saving logic goes here!
    puts "saved"
  end

August 11, 2008
4:26PM EDT
by mislav

From 5694cb272541b3b22cec791327eb37dc1b4f944d Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Mislav=20Marohni=C4=87?= <mislav.marohnic@gmail.com>
Date: Mon, 11 Aug 2008 22:22:00 +0200
Subject: [PATCH] Namespacing: wrap everything in anonymous function.
Remove deprecated.js and add a hack that copies references of local classes and functions to Prototype object.

August 09, 2008
12:22PM EDT
by mislav

## observeOnce implementation
Element.addMethods({
  observeOnce: function(element, name, fn) {
    var wrapper = function(event) {
      this.stopObserving(name, wrapper)

August 07, 2008
8:35PM EDT
by mislav

class MyModel
  def self.find_entries(params)
    fields = [:prefix, :two_letter, :three_letter]
    
    conditions = fields.inject([[]]) do |where, field|

August 06, 2008
8:36PM EDT
by mislav

function hasListener(element) {
  element = $(element)
  var id = null
  if (element === window) id = 1
  else if (element._prototypeEventID) id = element._prototypeEventID[0]

August 06, 2008
7:18PM EDT
by mislav

var container = $('container')
var divs = container.childElements()

var sorted_divs = divs.sortBy(function(div) {
  div.innerHTML.strip().toLowerCase()

June 25, 2008
10:22AM EDT
by mislav

## single slash => silent comment
#foo
  :color black
  / comment

June 08, 2008
8:05AM EDT
by mislav

## original (broken) code
var ReadHash = Class.create();
ReadHash.prototyte = {
  initialize: function(data){
    this.data=data;

May 15, 2008
9:11PM EDT
by Mislav

<% for work in @works %>
  <div id="workColumnOne">        
    <%= h work.title %> <br />
    <div id="workSpecs"><%= h work.specs %></div>
    <%= h work.copy %>

May 09, 2008
5:37PM EDT
by Mislav

  # predefined ANSI color codes for HTTP verbs
  colors = { "POST" => '35;1', "PUT" => '36;1', "DELETE" => '31;1' }

  String.class_eval do
    if RUBY_PLATFORM.index('mswin').nil?

April 26, 2008
12:37PM EDT
by Mislav

## Rake task to create/update a .manifest file in your project, as well as update *.gemspec
desc %{Update ".manifest" with the latest list of project filenames. Respect\
.gitignore by excluding everything that git ignores. Update `files` and\
`test_files` arrays in "*.gemspec" file if it's present.}
task :manifest do

April 19, 2008
4:05PM EDT
by Mislav

From 52c78f9649e6d06d591fa1b5f52187580999f0fa Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Mislav=20Marohni=C4=87?= <mislav.marohnic@gmail.com>
Date: Sat, 19 Apr 2008 22:04:25 +0200
Subject: [PATCH] Remove default_style from Attachment#interpolate. Fix incorrect doc at Attachment#valid?

April 12, 2008
12:45PM EDT
by Mislav

## Enforce that changed lines can only be documentation
#!/bin/sh
#
# This git pre-commit hook makes sure you haven't changed any Ruby code
# while contributing to documentation.

Next page