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
// see http://thesassway.com/intermediate/responsive-web-design-part-2 | |
@media only screen and (max-width: 480px) | |
@content | |
@else if $media == desktops | |
@media only screen and (min-width: 480.1px) | |
@content | |
@else if $media == max-screens | |
@media only screen and (min-width: 1210px + 2*$main-padding + 2*$grid-width + 0.1) | |
@content |
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
def escape(s) | |
s.gsub(/[&<>"]/, '&' => '&', '>' => '>', '<' => '<', '"' => '"') | |
end |
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
### | |
A meta-compilation of: | |
https://raw.github.com/gist/1453705/d253733a56632a8d2c29321a75c18b627fa4dda8/reserved_usernames.rb | |
http://blog.postbit.com/reserved-username-list.html | |
http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features | |
(Took out some company-specific terms at the top of the first one (e.g. imulus, stacks), added one term so far - 'edits'.) | |
NOTE: Does not include profanities. You may or may not want to add a list of those. | |
(See https://www.google.com/search?q=profanity+list, but don't try to apply regexp's here because Scunthorpe - http://en.wikipedia.org/wiki/Scunthorpe_problem) |
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
<input name='email' type='email' /> | |
<div class='suggestion'> | |
<span>Did you mean <span class='value'></span>?</span> | |
</div> |
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
# "borrowed" from https://github.com/rails/rails/tree/3-2-stable/railties/lib/rails/generators/rails/app/templates/config/initializers | |
module Irregularities | |
attr_accessor :acronyms | |
def acronym(word) | |
@acronyms[word.downcase] = word | |
@acronym_regex = /#{@acronyms.values.join("|")}/ | |
end |
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
class EpisodeSweeper < ActionController::Caching::Sweeper | |
observe Series, Episode | |
def after_create(record) expire_series_episodes_cache(record) ; end | |
def after_update(record) expire_series_episodes_cache(record) ; end | |
def after_destroy(record) expire_series_episodes_cache(record) ; end | |
def expire_series_episodes_cache(record) | |
series = record.is_a?(Series) ? record : record.series |
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
// This was what I got, pasted into an email. | |
// v0.0.0.2 Robust version with namespacing | |
module.exports = function(grunt) { | |
//Grunt Globals | |
com.wtfjs.constants = new Array(); | |
com.wtfjs.constants.ConcatOutputFileNameAndLocation="c:\\TestOutput.js"; | |
com.wtfjs.constants.JavascriptDirectory = 'C:\\Work\\Patch29\\StaticContent\\RootAssets\\JsLib' | |
com.wtfjs.constants.MessageTaskStart = "StartingTask_"; | |
com.wtfjs.constants.MessageTaskEnd = "EndingTask_"; |
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
Install Node | |
npm install -g grunt | |
grunt init:jquery |
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
#home(data-role='page') | |
%div(data-role='header') | |
%div(data-role='content') | |
%h2 Select a category | |
%ul(data-role='listview' data-inset='true') | |
%li | |
%a(href='test.html') users | |
%li | |
%a(href='test.html') news | |
%li |
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
$page.page() | |
$("[data-role='listview']").listview() | |
$.mobile.changePage($page) |