$ rails g model User
belongs_to
has_one
| <!DOCTYPE html> | |
| <script src="url.js"></script> | |
| <script> | |
| var url = new URL('http://www.example.com/a/b/c.html?p=q&r=s&p&p=t#hash'); | |
| for (var key in url) { | |
| console.log(key, url[key]); | |
| } |
| var cat = {}; | |
| /** | |
| * cat.NewsBox | |
| * Retrieves news from Google | |
| */ | |
| cat.NewsBox = (function(){ | |
| function NewsBox(searchTerm, injectFn) { | |
| this.searchTerm = searchTerm; |
| class UsersController < ApplicationController | |
| respond_to :html, :json | |
| def index | |
| @json = User.all.to_gmaps4rails | |
| respond_with @json | |
| end | |
| end |
Movies Recommendation:
Music Recommendation:
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
| // Example 1 | |
| mediator.name = 'Doug'; | |
| mediator.subscribe('nameChange', function(arg){ | |
| console.log(this.name); | |
| this.name = arg; | |
| console.log(this.name); | |
| }); | |
| mediator.publish('nameChange', 'Jorn'); |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| Rails::Application.routes.draw do | |
| constraints :subdomain => 'admin' do | |
| namespace(:admin, :path => '/') do | |
| resources :books | |
| end | |
| end | |
| end |