Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
- node.js
- Installation paths: use one of these techniques to install node and npm without having to sudo.
- Node.js HOWTO: Install Node+NPM as user (not root) under Unix OSes
- Felix's Node.js Guide
- Creating a REST API using Node.js, Express, and MongoDB
- Node Cellar Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB
- JavaScript Event Loop
- Node.js for PHP programmers
- WYSIWYG HTML
- integrates with MoxieManager for file management (PHP only)
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
Show hidden characters
{ | |
"color_scheme": "Packages/User/Railscasts.tmTheme", | |
"font_size": 12, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": false, |
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
# bundle exec rails runner "eval(File.read 'lib/scripts/recreate_versions.rb')" | |
Product.all.each do |p| | |
%w(photo1 photo2 photo3 photo4 photo5).map(&:to_sym).each do |photo| | |
p.send(photo).recreate_versions! if p.read_attribute(photo).present? | |
end | |
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
function maybe(value) { | |
var obj = null; | |
function isEmpty() { return value === undefined || value === null } | |
function nonEmpty() { return !isEmpty() } | |
obj = { | |
map: function (f) { return isEmpty() ? obj : maybe(f(value)) }, | |
getOrElse: function (n) { return isEmpty() ? n : value }, | |
isEmpty: isEmpty, | |
nonEmpty: nonEmpty | |
} |
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
padrino g project padrino_test -d activerecord -t cucumber -s jquery -e haml -c sass -m mocha |
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
# compass create --syntax sass --sass-dir "app/assets/stylesheets" --css-dir "public/stylesheets" --javascripts-dir "app/assets/javascripts" --images-dir "public/images" | |
compass create -r bootstrap-sass --using bootstrap --syntax sass --sass-dir "app/assets/stylesheets" --css-dir "public/stylesheets" --javascripts-dir "app/assets/javascripts" --images-dir "public/images" | |
# compass create compass-test -r bootstrap-sass --using bootstrap --syntax sass | |
# Result: | |
Congratulations! Your compass project has been created. | |
You may now add and edit sass stylesheets in the sass subdirectory of your project. |
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
Compass vs. SASS project detection | |
LiveReload detects a project as a Compass one if one of the following conditions hold true: | |
there is a file config/compass.rb, .compass/config.rb, config/compass.config, src/config.rb or config.rb somewhere in your project which contains a literal string compass plugins or preferred_syntax = : inside | |
there is an SCSS/SASS file that imports compass* or *ZURB-foundation* | |
If that does not work for your project, please contact us and we'll fix it. |
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
# app/constraints/photo_constraint.rb | |
class PhotoConstraint | |
def initialize | |
@types = Photo::TYPES | |
end | |
def self.matches?(request) | |
@types.include?(request.path_parameters[:type]) | |
end | |
end |