This file contains hidden or 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
.icons-sprite | |
.icons-ad | |
.icons-add-small | |
.icons-add-tiny | |
.icons-ae | |
.icons-af | |
.icons-ag | |
.icons-ai | |
.icons-al | |
.icons-alert-error |
This file contains hidden or 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
$ -> | |
jquery_ui_classes = [".ui-tabs", ".ui-tabs-nav", ".ui-tabs-panel", ".ui-widget", ".ui-widget-header", ".ui-widget-content", ".ui-corner-all", ".ui-corner-top", ".ui-corner-bottom", ".ui-helper-clearfix", ".ui-helper-reset", ".ui-state-default"] | |
$(".js-tabs").tabs().each -> | |
# removes all the jquery-ui specific classes (except ones like ui-state-active) | |
$elements = $(this).find( jquery_ui_classes.join(", ") ).andSelf() | |
$elements.removeClass( jquery_ui_classes.join(" ").replace(/\./g, "") ) |
This file contains hidden or 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
curl -v -H "Accept: text/javascript, text/html, application/xml, */*" http://localhost:3000/places/12356-apartment-berlin-prenzlauerberg/calendar\?for_date\=2012-05-01 | |
* About to connect() to localhost port 3000 (#0) | |
* Trying 127.0.0.1... connected | |
* Connected to localhost (127.0.0.1) port 3000 (#0) | |
> GET /places/12356-apartment-berlin-prenzlauerberg/calendar?for_date=2012-05-01 HTTP/1.1 | |
> User-Agent: curl/7.21.6 (x86_64-pc-linux-gnu) libcurl/7.21.6 OpenSSL/1.0.0e zlib/1.2.3.4 libidn/1.22 librtmp/2.3 | |
> Host: localhost:3000 | |
> Accept: text/javascript, text/html, application/xml, */* | |
> | |
< HTTP/1.1 200 OK |
This file contains hidden or 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
# I find myself constantly wanting to check whether one string is included within an array of strings. | |
# It is certainly possible (and also fast) to do that in Ruby with something like this: ["foo", "bar"].include?("foo") | |
# But I don't think it reads very nice :( | |
# Because what I actually want to test is, whether my string is included in the array and NOT the other way around. | |
# - Do you have the same problem? | |
# - What do you think about the following two solutions? | |
class String | |
# create a new method |
This file contains hidden or 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
require 'rubygems' | |
require 'yaml' | |
YAML::ENGINE.yamler = 'psych' | |
Dir["**/*.yml"].each do |file| | |
puts file | |
YAML.load_file file | |
end;0 |
This file contains hidden or 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
@mixin input-placeholder($color) | |
&.placeholder | |
color: $color | |
&:-moz-placeholder | |
color: $color | |
&::-webkit-input-placeholder | |
color: $color |
This file contains hidden or 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
// -- datepicker -- | |
// booking | |
$('#booking_start_date').datepicker({ | |
onSelect: function(dateText, inst) { | |
$('#booking_end_date').datepicker("option", 'minDate', new Date(dateText)); | |
}, | |
beforeShowDay: disableUnavailableDays, | |
dateFormat: 'dd-mm-yy' | |
}); | |
$('#booking_end_date').datepicker({ |
NewerOlder