My Recent Pastes (32 and counting)
Recent Pasties by Mislav (32 and counting)
Below are summaries of the 15 most recent pasties by Mislav.
June 25, 2008
10:22AM EDT
by mislav
View more (27 lines)
1 2 3 4 5 |
## single slash => silent comment #foo :color black / comment |
June 08, 2008
8:05AM EDT
by mislav
View more (45 lines)
1 2 3 4 5 |
## original (broken) code var ReadHash = Class.create(); ReadHash.prototyte = { initialize: function(data){ this.data=data; |
May 15, 2008
9:11PM EDT
by Mislav
View more (31 lines)
1 2 3 4 5 |
<% 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
View more (12 lines)
1 2 3 4 5 |
# 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
View more (28 lines)
1 2 3 4 5 |
## 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
View more (87 lines)
1 2 3 4 5 |
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
View more (53 lines)
1 2 3 4 5 |
## 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. |
April 08, 2008
8:19AM EDT
by Mislav
View more (37 lines)
1 2 3 4 5 |
## a simple wrapper for Benchmark.bm require 'benchmark' def compare(times = 1, label_width = 12) Benchmark.bm(label_width) do |x| |
March 04, 2008
11:15AM EDT
by Mislav
View more (16 lines)
1 2 3 4 5 |
## will_paginate:install Sake task # gem install sake # sake -i http://pastie.org/161203.txt desc %[Install the plugin in vendor/plugins/will_paginate] |
February 29, 2008
11:30AM EDT
by Mislav
View more (34 lines)
1 2 3 4 5 |
## HTML [html] <input type="file" name="images[]" /> ## upload.php (fragment) <?php |
February 26, 2008
5:34AM EDT
by Mislav
View more (140 lines)
1 2 3 4 5 |
diff --git a/lib/haml/engine.rb b/lib/haml/engine.rb index dd4c7a2..d491d77 100644 --- a/lib/haml/engine.rb +++ b/lib/haml/engine.rb @@ -37,7 +37,7 @@ module Haml |
February 22, 2008
9:31AM EDT
by Mislav
View more (43 lines)
1 2 3 4 5 |
## Radiant CMS hook to include ajax-save.js in admin edit views # can be put in the `activate` method of an extension Admin::PageController.class_eval do before_filter :enable_ajax_save, :only => [:edit] |
February 07, 2008
10:04PM EDT
by Mislav
View more (221 lines)
1 2 3 4 5 |
Index: app/views/admin/page/_attachments_box.rhtml =================================================================== --- app/views/admin/page/_attachments_box.rhtml (revision 421) +++ app/views/admin/page/_attachments_box.rhtml (revision 422) @@ -1,8 +0,0 @@ |
February 01, 2008
12:57PM EDT
by Mislav
View more (97 lines)
1 2 3 4 5 |
## ActionMailer standalone example require 'rubygems' require 'actionmailer' ## this whole huge hack is for GMail TLS |
January 20, 2008
8:05AM EDT
by Mislav
View more (13 lines)
1 2 3 4 5 |
## usage [rhtml] <%= edit employee %> ## result [html] <a href="/employees/1/edit">edit employee</a> |
Pastie