I hereby claim:
- I am pheuter on github.
- I am markfayngersh (https://keybase.io/markfayngersh) on keybase.
- I have a public key whose fingerprint is 57E0 005D 96B5 5B63 C102 899A 6F7F 5E37 2A2F ED01
To claim this, I am signing this object:
0x94b830d74b649bbe82c44ba13201db4b63703f0f |
0xcd480AcE2ab78C48131BE418eCad556EEC56741e |
0x93DD32a66BCFF2ccBC6F95336cAc34c242857402 |
mark | |
Jan 8, 2016 | |
---- | |
[11:45 AM] | |
yeah, and then i realized im thinking too much about it, and i went with the faster tool whose assertion syntax covers everything our tests use so far and is a relatively simple port over. | |
[11:46] | |
honestly, both tools are close, and i just picked one i feel can service us more with the bleeding edge environment we’re on | |
[11:46] |
require 'open-uri' | |
require 'nokogiri' | |
i = 0 | |
file = File.new "ross_image_urls.txt", "w" | |
50.times do | |
imageUrls = Nokogiri::HTML(open(URI.escape("https://www.google.com/search?q=rick+ross&biw=1301&bih=442&sei=WKvrU9nIJ43gsASAxYHQDQ&tbm=isch&ijn=2&ei=WKvrU9nIJ43gsASAxYHQDQ&start=#{i}"))).css('img').each do |image| | |
file.puts image['data-src'] | |
end |
I hereby claim:
To claim this, I am signing this object:
class A | |
initialize: -> | |
@x = 1 | |
a = new A | |
x: 1 | |
log a |
describe('when ComputedFields initialized in Backbone.Model via Marionette.CollectionView', function () { | |
var model, collection, collectionView; | |
beforeEach(function () { | |
var Model = Backbone.Model.extend({ | |
initialize: function () { | |
this.computedFields = new Backbone.ComputedFields(this); | |
}, |
Handlebars.js is a template framework for Javascript environments. It allows the construction of HTML elements using HTML and expressions wrapped in {{ }}
One of the conditional block helpers Handlebars offers is the {{#if}}
.
For example:
<div class="entry">
(function(d) { | |
var dl = d.createElement('a'); | |
dl.innerText = 'Download MP3'; | |
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; | |
dl.download = d.querySelector('em').innerText+".mp3"; | |
d.querySelector('.primary').appendChild(dl); | |
dl.style.marginLeft = '10px'; | |
dl.style.color = 'red'; | |
dl.style.fontWeight = 700; | |
})(document); |