Skip to content

Instantly share code, notes, and snippets.

View ashleygwilliams's full-sized avatar
>o_o<

ashley williams ashleygwilliams

>o_o<
View GitHub Profile
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.
// 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;
@ashleygwilliams
ashleygwilliams / roost-chicago-QA.md
Last active August 29, 2015 14:06
Questions and Answers from Roost Chicago 2014 Hipchat

#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

  • Can someone please remind me what $el refers to in `this.$el.empty()'?

@ashleygwilliams
ashleygwilliams / posts.sh
Last active August 29, 2015 14:10
testing POST on piep
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
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);
"hello my hello name is ashley".replace(/^(hello).+/g, '$1 other stuff instead')
"hello other stuff instead"
@ashleygwilliams
ashleygwilliams / Gemfile
Last active August 29, 2015 14:21
sinatra-contrib-1.8.7-rake-errors
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
have_library: checking for main() in -lstdc++... -------------------- yes
"gcc -o conftest -I/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/x86_64-linux -I/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0/ruby/backward -I/home/ag_dubs/.rvm/rubies/ruby-head/include/ruby-2.3.0 -I. -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration -Wdeprecated-declarations -Wno-packed-bitfield-compat -fPIC conftest.c -L. -L/home/ag_dubs/.rvm/rubies/ruby-head/lib -Wl,-R/home/ag_dubs/.rvm/rubies/ruby-head/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-R/home/ag_dubs/.rvm/rubies/ruby-head/lib -L/home/ag_dubs/.rvm/rubies/ruby-head/lib -lruby -lpthread -lgmp -ldl -lcrypt -lm -lc"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;