"hello my hello name is ashley".replace(/^(hello).+/g, '$1 other stuff instead')
"hello other stuff instead"
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
source "https://rubygems.org" unless ENV['QUICK'] | |
gemspec | |
gem 'sinatra', :github => 'sinatra/sinatra' | |
gem 'temple', :github => 'zzak/temple', :branch => '0-6-patched' | |
group :development, :test do | |
platform :ruby_18, :jruby do | |
gem 'json' | |
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
lkjfdklgjalkg |
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
const fs = require('fs'); | |
const _ = require('underscore'); | |
const config = require('./config'); | |
const resources = config.resources; | |
var raw_template = fs.readFileSync('./test_template.js'); | |
var template = _.template(raw_template); |
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
LIST POST | |
curl -H "Content-Type: application/json" -d '{"curator":"Ashley","curator_org":null,"collaborators":null,"name":"POST request TEST","description":"DO YOU EVEN POST BRO","version":"0.0.0","license":"MIT","keywords":null}' http://localhost:8080/api/0/lists | |
RESOURCE POST | |
curl -H "Content-Type: application/json" -d '{"author":"Ashley","author_org":null,"title":"POST?","description":"testtesttest","github_url":"https://github.com/tbranyen/angular-directive.git","keywords":null,"version":"5.0.0","license":"MIT"}' http://localhost:8080/api/0/resources |
#Roost Chicago 2014 Q&A
-
Is there any reason you're using the require() inside a define() rather than simply declaring the dependencies in the define(), such as define('backbone', function(backbone) { ... });
the problem with using requires inline rather than declaring dependencies that a race condition for loading may happen. define() and require() are slightly different
in app code, it's really a matter of style. listing deps in an array is the AMD format, using require is the CommonJS style. A script loader has to parse the CommonJS format to build up the AMD-style array before it runs, but otherwise they behave the same
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
// A LESS TRITE EXAMPLE | |
// we might make an object to use in a game, for example let's think of | |
// Pokemon | |
function Pokemon(options) { | |
this.name = options.name; | |
this.hp = options.hp; | |
this.moves = options.moves; |
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
Death is nothing at all. | |
It does not count. | |
I have only slipped away into the next room. | |
Nothing has happened. | |
Everything remains exactly as it was. | |
I am I, and you are you, | |
and the old life that we lived so fondly together is untouched, unchanged. | |
Whatever we were to each other, that we are still. | |
Call me by the old familiar name. | |
Speak of me in the easy way which you always used. |
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
NoMethodError: undefined method `task' for Sinatra::Application:Class |