- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
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
### | |
Modernizr test for retina / high resolution / high pixel density | |
@ref https://gist.github.com/joaocunha/7675924 | |
@author Joao Cunha | |
@license MIT | |
### | |
Modernizr.addTest 'hires', -> | |
# starts with default value for modern browsers |
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
// Add a custom controller | |
add_filter('json_api_controllers', 'add_my_controller'); | |
function add_my_controller($controllers) { | |
$controllers[] = 'Korkmaz'; | |
return $controllers; | |
} | |
// Register the source file for our controller | |
add_filter('json_api_korkmaz_controller_path', 'korkmaz_controller_path'); | |
function korkmaz_controller_path($default_path) { |
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
[ | |
[ | |
"Afghanistan", | |
"AF" | |
], | |
[ | |
"Aland Islands", | |
"AX" | |
], | |
[ |
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
# Logs and databases # | |
###################### | |
*.log | |
*.sql | |
*.sqlite | |
# OS generated files # | |
###################### | |
.DS_Store? | |
ehthumbs.db |
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
-# -------------------- | |
-# RENDER PARTIAL FUNCTION | |
-# Render function inside haml file | |
-# -------------------- | |
- def render(partial) Haml::Engine.new(File.read("app/templates/#{partial}")).render 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
- Always refer to http://expressjs.com/api.html
- Everything is “middleware”.
- use means “Run this on ALL requests”
- get means “Run this on a GET request, for the given URL”
- in between middleware should return
next()
orres.end()
- Ends the response process.
OlderNewer