This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nvidia-settings: X configuration file generated by nvidia-settings | |
# nvidia-settings: version 1.0 (buildd@palmer) Fri Apr 9 10:35:18 UTC 2010 | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "Mouse0" "CorePointer" | |
EndSection |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
resources :houses do | |
resources :members | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gemfile | |
config.gem "liquid" | |
# routes.rb | |
get "/handlers/:action", :to => "handlers" | |
# view/handlers/liquid.html.liquid | |
testing 1..2..3 | |
# lib/handlers.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TestClass = Class.create({ | |
initialize: function(){ | |
//fancy stuff here | |
} | |
}); | |
document.observe("dom:loaded", function(){ new TestClass(); }); | |
// or | |
(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# old | |
def build_form_response | |
form_response = self.form_responses.new | |
self.questions.each do |question| | |
form_response.answers.build(:question => question) | |
end | |
form_response | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Object | |
def tap(method =nil, *params, &block) | |
block.call(self) if block | |
self.send(method, *params) if method | |
self | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rails3 + meta_where | |
name_relation = Article.where(:title >> "name") | |
name2_relation = Article.where(:title >> "name2") | |
# how to get an sql query like: "select * from articles where (title = 'name') or (title = 'name2') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def top_articles_for(widget_page_title, current_user) | |
article_relations = widget_page_widgets_for(widget_page_title, current_user).all.collect(&:widget).collect do |widget| | |
widget.top_articles | |
end | |
article_relations.inject {|sum, x| sum | x} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Index</title> | |
<style type="text/css"> | |
style { | |
display: block; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>Pimp</title> | |
<meta HTTP-EQUIV="REFRESH" content="0; url=http://pimp.maggie.test.royapps.nl"> | |
<!-- <meta HTTP-EQUIV="REFRESH" content="0; url=http://plugin.mspsite.com/action/showservice.jsp?homePath=http://www.mspportal.com/community&serviceid=grimradiolist&res=1280x720">--> | |
</head> | |
<body> |
OlderNewer