tail -r file
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
angular.module('app.common.directives.html-editor', []) | |
.directive('htmlEditor', function() { | |
return { | |
restrict: 'E', | |
scope: { | |
'html': '=' | |
}, | |
link: function (scope, element, attrs, ctrl) { | |
// this is a browserify bundle where my react components live |
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
setInterval(function() { | |
Array.prototype.slice.call(document.querySelectorAll('[data-reactid]')).forEach(function(node) { | |
node.style.backgroundColor = 'rgba(255, 0, 0, 0.1)'; | |
}) | |
}, 500) |
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
ChangingModelPropMixin = function(propName, handlerName) { | |
return { | |
componentWillReceiveProps: function(nextProps) { | |
if (nextProps[propName] && nextProps[propName] !== this.props[propName]) { | |
this.props[propName].removeListener("change", this[handlerName]); | |
nextProps[propName].on("change", this[handlerName]); | |
} | |
}, | |
componentDidMount: function () { |
var data = keyMirror({
ONE: null,
TWO: null,
OTHER: keyMirror({
STUFF: null
}, "OTHER")
});
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
/* Native HTML5 promises will swallow exceptions if you're not careful. For example: | |
* | |
* promise.then(function() { | |
* something.froEach(iterator); | |
* }); | |
* | |
* This extension patches the Promise prototype with a `done` method that will log errors: | |
* | |
* promise.then(function() { | |
* something.froEach(iterator); |
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
package net.binarymuse.EmbeddedGwt; | |
import org.eclipse.jetty.server.Server; | |
import org.eclipse.jetty.util.thread.QueuedThreadPool; | |
import org.eclipse.jetty.webapp.WebAppContext; | |
public class EmbeddedGwt { | |
public static void main(String[] args) throws Throwable { |
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
HTML Template: | |
{foreach releases as release} | |
<h1><a href="{release.link}">{release.title}</a></h1> | |
<p>{release.teaser}</p> | |
{/foreach} | |
<p><small>If you believe this has been sent to you in error, please safely <a href="{optout_confirm_uri}">unsubscribe</a>.</small></p> | |
Feed URL: |
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
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ (\1$(parse_git_stash))/" | |
} | |
parse_git_stash() { | |
git stash list 2> /dev/null | wc -l | sed -e "s/ *\([0-9]*\)/\ \+\1/g" | sed -e "s/ \+0//" | |
} | |
parse_svn_branch() { | |
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -F / '{print " ("$1 "/" $2 ")"}' | |
} | |
parse_svn_url() { |
OlderNewer