Skip to content

Instantly share code, notes, and snippets.

activemodel (3.2.8) lib/active_model/naming.rb:163:in `model_name_from_record_or_class'
activemodel (3.2.8) lib/active_model/naming.rb:158:in `param_key'
actionpack (3.2.8) lib/action_view/helpers/form_helper.rb:369:in `form_for'
app/views/contact_forms/_form.html.erb:1:in `_app_views_contact_forms__form_html_erb__990652550806118441_70339152604180'
actionpack (3.2.8) lib/action_view/template.rb:145:in `block in render'
activesupport (3.2.8) lib/active_support/notifications.rb:125:in `instrument'
actionpack (3.2.8) lib/action_view/template.rb:143:in `render'
actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:265:in `render_partial'
actionpack (3.2.8) lib/action_view/renderer/partial_renderer.rb:238:in `block in render'
actionpack (3.2.8) lib/action_view/renderer/abstract_renderer.rb:38:in `block in instrument'
([["Mo ", "06:00 - 08:00 ", " "], ["Di ", "06:00 - 08:00 ", " "]]).map{|k| k.map{|j| pp j.strip}}
@memetical
memetical / Person2.rb
Created October 31, 2012 23:30 — forked from anonymous/Person2
rubyEx2
class Person
attr_accessor :name, :hobbies
def initialize(params)
params.each_key {|key|
begin
self.send("#{key}=".to_sym, params[key])
rescue
raise UnknownAttributeError
end
@memetical
memetical / ex3.rb
Created October 31, 2012 18:53 — forked from anonymous/ex3
exercise3
# Exercise: write a proc that provides content for the following html template:
def template
template =<<DELIM
<html>
<head>
#{yield :header}
</head>
<body>
#{yield}
<hr>
import org.json.*;
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int pin = 13;
int myDay = 0;
int sw = 0;
String [] query = {"syria"};
@memetical
memetical / latex.template
Created February 12, 2012 23:27 — forked from michaelt/latex.template
Simple Pandoc default.latex with comments
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.