My Recent Pastes (40 and counting)
Pastes by Mislav (40 and counting)
Below are the 15 most recent pasties by Mislav.
April 08, 2008
8:19AM EDT
by Mislav
View more (37 lines)
## 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)
## 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)
## HTML [html] <input type="file" name="images[]" /> ## upload.php (fragment) <?php
February 26, 2008
5:34AM EDT
by Mislav
View more (140 lines)
diff --git a/lib/haml/engine.rb b/lib/haml/engine.rbindex 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)
## 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)
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)
## 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)
## usage [rhtml] <%= edit employee %> ## result [html] <a href="/employees/1/edit">edit employee</a>
November 03, 2007
6:06PM EDT
by Mislav
View more (1,174 lines)
Index: /home/mislav/projects/radiant/app/controllers/application.rb===================================================================--- /home/mislav/projects/radiant/app/controllers/application.rb (revision 573)+++ /home/mislav/projects/radiant/app/controllers/application.rb (working copy)@@ -1,9 +1,5 @@
October 19, 2007
7:18PM EDT
by Mislav
View more (418 lines)
Index: app/views/admin/page/edit.rhtml===================================================================--- app/views/admin/page/edit.rhtml (revision 562)+++ app/views/admin/page/edit.rhtml (working copy)@@ -28,7 +28,7 @@
October 15, 2007
2:56PM EDT
by Mislav
View more (44 lines)
## template [plaintext] <div id="items"> <? foreach($items as $item): ?> <div id="item_<?= $item->id ?>"> <h2><?= $item->title ?></h2>
October 14, 2007
6:44AM EDT
by Mislav
View more (21 lines)
!!Goliath:~ $ tracepath mislav.caboo.se 1: Goliath.local (192.168.100.11) 0.165ms pmtu 1500 1: 192.168.100.10 (192.168.100.10) 0.620ms 2: 192.168.100.10 (192.168.100.10) asymm 1 0.535ms pmtu 1400 3: CN-Srce-02-ES.zg.core.CARNet.hr (193.198.228.129) 15.084ms
October 05, 2007
4:34PM EDT
by Mislav
View more (128 lines)
## html [html]
<div id='pitanja'>
<form action='#'>
<div class='left'>
<b>Pogledaj: sve</b>
October 04, 2007
11:31AM EDT
by Mislav
View more (35 lines)
## controller def list @videos = if (@category = Category.find_by_slug params[:slug]) # if category is given, we will scope to it @category.videos
September 27, 2007
4:56PM EDT
by Mislav
View more (11 lines)
function getThingDetails(id) { var details = 'front'; new Ajax.Request('/things/ajax.locationmap.php', { method: 'post', parameters: {tid: id},
