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
#!/bin/bash | |
cmd='mosquitto_pub -h 192.168.7.2 -t led'; | |
times=$1 || 10; | |
for i in `seq 1 $times` | |
do | |
$cmd -m RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR | |
echo 'DANGER!' | |
sleep 1 | |
$cmd -m X | |
sleep 1 |
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
[Warning] Invalid CSS property declaration at: / (css.css, line 25) | |
[Warning] Invalid CSS property declaration at: / (css.css, line 68) | |
[Warning] Invalid CSS property declaration at: / (css.css, line 97) | |
[Warning] Invalid CSS property declaration at: / (css.css, line 114) | |
[Warning] Invalid CSS property declaration at: / (css.css, line 125) | |
[Warning] Invalid CSS property declaration at: / (css.css, line 126) | |
[Warning] Invalid CSS property declaration at: / (css.css, line 134) | |
[Warning] Invalid CSS property declaration at: / (css.css, line 143) | |
[Warning] Invalid CSS property declaration at: / (css.css, line 159) | |
[Warning] Invalid CSS property declaration at: / (css.css, line 161) |
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
<%= | |
calendar_for(current_timespan.first.year, current_timespan.first.month, | |
:month_navigation_url_helper => :calendar_events_path, | |
:month_navigation_url_helper_args => {:section => @section} ) do |day| | |
if calendar_section.days_in_month_with_events(day).include?(day) | |
[link_to(day.day, calendar_events_path(:section => @section, :year => day.year, :month => day.month, :day => day.mday)), { :class => "dayWithEvents" }] | |
else | |
day.day | |
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
Given /I am logged in as "(.*)"/ do |username| | |
Given "there is a User \"#{username}\"" | |
Given "I follow \"log in\"" | |
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
!!! | |
%html{:xmlns => "http://www.w3.org/1999/xhtml", 'xml:lang' => 'en', :lang => 'en'} | |
%head | |
= render :partial => "shared/head" | |
%body | |
#wrapper | |
#header | |
= link_to 'vote.ananasblau', root_url |
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
Processing Admin::InstallController#index (for 213.129.230.12 at 2009-08-21 18:52:25) [GET] | |
Parameters: {"action"=>"index", "controller"=>"admin/install"} | |
Rendering template within layouts/simple | |
Rendering admin/install/index | |
Completed in 425ms (View: 58, DB: 6) | 200 OK [http://blog.photostre.am/] | |
/!\ FAILSAFE /!\ Fri Aug 21 18:54:26 +0200 2009 | |
Status: 500 Internal Server Error | |
undefined method `rewind' for #<IO:0x2b9d768ca980> | |
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/request.rb:150:in `POST' | |
/usr/lib/ruby/gems/1.8/gems/rack-1.0.0/lib/rack/methodoverride.rb:15:in `call' |
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
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb | |
index 1dc7c96..cf6d574 100644 | |
--- a/activerecord/lib/active_record/validations.rb | |
+++ b/activerecord/lib/active_record/validations.rb | |
@@ -105,6 +105,7 @@ module ActiveRecord | |
# blank: This title is screwed! | |
def generate_full_message(message, options = {}) | |
keys = [ | |
+ options.delete!(:default), | |
:"full_messages.#{@message}", |
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
<IFRAME SRC="http://postedit.photostre.am/" WIDTH="960" HEIGHT="500px" FRAMEBORDER="0"> Your browser does not support IFRAME</IFRAME> |
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
# The basic idea is that we take the existing data via ActiveRecord | |
# and create new documents in MongoDB using MongoMapper. | |
# This method is necessary as we want to keep all the associations of existing dataset | |
# and by the way, clean up empty columns | |
# We rely on models still being ActiveRecord::Base, I bet you can figure out how the look like. | |
# And have the newer MongoDB ones here in a module, painful as we have to set the collection_name | |
# Don't put a +timestamps!+ into your MongoMapper models yet because this would change the updated_at if existing | |
# As you see in the MongoDB models, a few loose their indepence, e.g. Source as I | |
# plan to add other sources besides flickr, or Page and Album which only make sense in | |
# their parent Website |
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
trash_file = { | |
file_name: 'gorge_bush.jpg', | |
user: 'Anonymous', | |
tags: ['george', 'bush', 'shoe'], | |
comments: [{_id: new ObjectId(), user: 'Tom', comment: 'Yeah!'}, { _id: new ObjectId(), user: 'oib', comment: 'Hit him!'}], | |
created_at: new Date(), | |
points: 0, | |
delete_at: null, | |
} | |
OlderNewer