Skip to content

Instantly share code, notes, and snippets.

var = if f1 "param"
f1 "param"
elsif f2 "param"
f2 "param"
elsif f3 "param"
...
end
{"log":{"version":"1.2","creator":{"name":"WebInspector","version":"534.16"},"pages":[{"startedDateTime":"2011-01-27T08:42:36.641Z","id":"chrome://chromewebdata/","title":"","pageTimings":{"onContentLoad":32,"onLoad":39}}],"entries":[{"pageref":"https://mc-s200.postini.com/exec/MsgCtr?action=display_Message&msgid=56523137843796817084936773626132_msgs14&disp=M","startedDateTime":"2011-01-27T08:42:35.102Z","time":380,"request":{"method":"GET","url":"https://mc-s200.postini.com/exec/MsgCtr?action=display_Message&msgid=56523137843796817084936773626132_msgs14&disp=M","headers":[{"name":"Accept-Encoding","value":"gzip,deflate,sdch"},{"name":"Accept-Language","value":"en,en-US;q=0.8"},{"name":"Cookie","value":"email=sami%40badwolf.fi; __utmz=169296701.1295899782.29.29.utmcsr=google.com|utmccn=(referral)|utmcmd=referral|utmcct=/a/cpanel/badwolf.fi/Dashboard; __utma=169296701.1076605188.1292886510.1295783872.1295899782.29; __utmv=169296701.MC2%20-%20msgctr%2Ftrash"},{"name":"Connection","value":"keep-alive"},{"name":"
- unless local_assigns[:returnpath]
- returnpath = {}
- form_for(contact_edit, :url=>returnpath) do |f|
= f.error_messages
.contact_edit
%fieldset
%legend contact edit
do other stuff here
class Deliveries < ActiveRecord::Base
alias :delivery_contact_orig, :delivery_contact
def delivery_contact
if self.delivery_contact_orig.nil?
self.owner_contact
else
self.delivery_contact_orig
end
end
end
{master¹//codetree} $ rails c
/home/ressu/.rvm/gems/ruby-1.9.2-p180/gems/mustang-0.2.2/lib/mustang/v8.so: [BUG] Segmentation fault
ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux]
[1] 16936 abort rails c
rails c 1,82s user 0,54s system 97% cpu 2,419 total
@ressu
ressu / gist:2854927
Created June 1, 2012 20:24
Bug example for money-rails
f
@ressu
ressu / 01-outside-tmux-crete-rvmrc.txt
Created November 28, 2012 15:28
Quick demo case on tmux + rvm problems. In Look of proper solutions
[ressu@regret:/tmp]
% mkdir demo
[ressu@regret:/tmp]
% cd demo
[ressu@regret:/tmp/demo]
% ls
[ressu@regret:/tmp/demo]
% rvm --create --rvmrc use 1.9.3@demo
Using /home/ressu/.rvm/gems/ruby-1.9.3-p327 with gemset demo
[ressu@regret:/tmp/demo]
=== Start output for job raspberrypi-kernel-3.2-r2 (0m28.6s) ===
raspberrypi-kernel-3.2-r2: >>> Emerging (1 of 1) sys-kernel/raspberrypi-kernel-3.2-r2 from raspberrypi for /build/raspberrypi/
raspberrypi-kernel-3.2-r2: * Running stacked hooks for pre_pkg_setup
raspberrypi-kernel-3.2-r2: * sysroot_build_bin_dir ...
raspberrypi-kernel-3.2-r2: [ ok ]
raspberrypi-kernel-3.2-r2: /home/ressu/trunk/src/third_party/chromiumos-overlay/eclass/cros-kernel2.eclass: line 276: cros-workon_pkg_setup: command not found
raspberrypi-kernel-3.2-r2: * Running stacked hooks for pre_src_unpack
raspberrypi-kernel-3.2-r2: * python_multilib_setup ...
raspberrypi-kernel-3.2-r2: [ ok ]
raspberrypi-kernel-3.2-r2: >>> Unpacking source...
@ressu
ressu / .vimrc
Last active August 29, 2015 13:58
My vim configuration
" Modeline and Notes {
" vim: set foldmarker={,} foldlevel=0 foldmethod=marker spell ft=vim:
"
" This configuration file contains pretty much everything needed to make Vim
" play nice (or at least like I want it to)
"
" Influenced by: https://github.com/spf13/spf13-vim/blob/master/.vimrc
"
" - Sami Haahtinen <sami@badwolf.fi>
" }
@ressu
ressu / designer.html
Created July 30, 2014 12:05
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../paper-slider/paper-slider.html">
<polymer-element name="vetrospace-relax">
<template>