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
// the scraper module | |
// you need to set it's gubbins with manipulate and get methods | |
var Scraper = function(){ | |
// public | |
setGubbins = function(gubb){ | |
gubbins = gubb; | |
}, |
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
var dress = subPage.evaluate(function(){ | |
//return a bullshit object | |
return { | |
id: '123' | |
}; | |
// all the other stuff | |
}); |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css"/> | |
<script src="http://cmx.io/v/0.1/cmx.js"></script> | |
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style> | |
<body> | |
<div style="max-width:900px; -webkit-transform:rotate(0deg);"> | |
<scene id="scene1"> | |
<label t="translate(0,346)"> |
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
#header { margin: 30px 0; } | |
#header .logo { float: left; width: 12.5%; margin: 0 10px; } | |
#header .logo img { max-width: 100%; } | |
#header .logo .seperator { display: none; position: absolute; width: 30px; top: 0; bottom: 0; left: -30px; background: transparent url('/assets/background/search-sep.png') repeat-y left top; } | |
#header .header_main { margin-left: 14.583333333333%; } |
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
#header { | |
margin: 30px 0; | |
.logo { | |
float: left; | |
width: 12.5%; | |
margin: 0 10px; | |
img { | |
max-width: 100%; | |
} | |
.seperator { |
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
$shadow-color: #d7d8d8 | |
#header { | |
.page_options{ | |
.options:hover { | |
z-index: 2000; | |
border: 1px | |
solid #d5d5d5; | |
border-bottom: 1px solid #dcdcdc; | |
@include box-shadow(2px 2px 2px $shadow-color); |
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
describe "Tip Model", -> | |
it "should exist", -> | |
expect(Mychicken.Models.Tip).toBeDefined() | |
describe "Attributes", -> | |
it 'should have attributes', -> | |
tip = new Mychicken.Models.Tip() | |
expect(tip.attributes.content).toBeDefined() | |
expect(tip.attributes.html).toBeDefined() |
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
describe("Tip Model", function() { | |
it("should exist", function() { | |
return expect(Mychicken.Models.Tip).toBeDefined(); | |
}); | |
describe("Attributes", function() { | |
return it('should have attributes', function() { | |
var tip; | |
tip = new Mychicken.Models.Tip(); | |
expect(tip.attributes.content).toBeDefined(); | |
return expect(tip.attributes.html).toBeDefined(); |
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
var OAuth2 = require('OAuth').OAuth2; | |
var https = require('https'); | |
var oauth2 = new OAuth2(KEY, SECRET, 'https://api.twitter.com/', null, 'oauth2/token', null); | |
oauth2.getOAuthAccessToken('', { | |
'grant_type': 'client_credentials' | |
}, function (e, access_token) { | |
console.log(access_token); //string that we can use to authenticate request | |
var options = { |
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
Project.ParentModel = Backbone.Model.extend({ | |
initialize: function(args){ | |
// children is a collection | |
this.set('children', args.children); | |
this.listenTo(this.get('children'), 'add', this._onChildrenAdd); | |
}, | |
_onChildrenAdd: function(child, collection){ | |
this.set('total', collection.reduce(function(memo, ch){ | |
return memo + ch.get('value'); | |
}, 0)) |
OlderNewer