Skip to content

Instantly share code, notes, and snippets.

View sonthonaxrk's full-sized avatar
👁️
Focusing

RK sonthonaxrk

👁️
Focusing
View GitHub Profile
function JSONResourceCollection(source, Type) {
if (Type.prototype.isPrototypeOf(JSONResource.prototype)) {
this.Type = Type;
} else {
// this get's thrown
throw "The Type must be a subclass of JSONResource";
}
}
JSONResourceCollection("http://example.com/", JSONResource);
function JSONResource(obj) {
this._watchFields = new Array();
this._serverCopy = obj;
for (var field in obj) {
if (obj.hasOwnProperty(field)) {
this._watchFields.push(field);
this[field] = obj[field];
}
}
class Model {
constructor(string) {
this.id = 20;
this.name = string;
}
}
module.exports = Model;
(django-dropoff)Rollos-Mac-Pro:backbone-playground Rollo$ babel-node ./node_modules/.bin/mocha
/Users/Rollo/Developer/backbone-playground/src/lib/Model.js:1
(function (exports, require, module, __filename, __dirname) { class Model {
^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:393:25)
at Object.Module._extensions..js (module.js:428:10)
at Module.load (module.js:335:32)
at Function.Module._load (module.js:290:12)
(django-dropoff)Rollos-Mac-Pro:backbone-playground Rollo$ babel-node /usr/local/bin/node-debug .
Node Inspector is now available from http://localhost:8080/debug?port=5858
Debugging `.`
Debugger listening on port 5858
/Users/Rollo/Developer/backbone-playground/src/lib/Model.js:1
(function (exports, require, module, __filename, __dirname) { class Model {
^^^^^
SyntaxError: Unexpected reserved word
at exports.runInThisContext (vm.js:53:16)
Rollos-Mac-Pro:react-boilerplate Rollo$ npm install jest-cli
npm WARN engine [email protected]: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"1.7.2","npm":"2.7.6"})
> [email protected] install /Users/Rollo/react-boilerplate/node_modules/jest-cli/node_modules/jsdom/node_modules/contextify
> node-gyp rebuild
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: 404 status code downloading tarball
gyp ERR! stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/install.js:246:14)
const Search = React.createClass({
render() {
return (
<div ref="container" className={containerClasses}>
<div id="location_search" className={locationSearchClasses}>
<div className="input-group-element">
<input
onChange={this.onSearch}
value={this.state.searchText}
(venv)[Me@MyApp]$ git push heroku master
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (8/8), 677 bytes | 0 bytes/s, done.
Total 8 (delta 6), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Deleting 0 files matching .slugignore patterns.
@sonthonaxrk
sonthonaxrk / Contract Killer 3.md
Created September 30, 2015 03:54
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

<ul>
<li> HTML
<li> is not
<li> XML
</li>