start new:
tmux
start new with session name:
tmux new -s myname
/** @jsx React.DOM */ | |
var RenderedDeck = React.createClass({ | |
render: function() { | |
return <div id={this.props.id} className="deck" dangerouslySetInnerHTML={{__html:this.props.contents}}></div>; | |
} | |
}); | |
var Deck = React.createClass({ | |
render: function() { |
Or: Turning a function into a promise
So many times while learning how to use promises, or trying to use them in my Angular applications, I would discover pieces of functionality that needed to be a promise, but weren't a $resource
(or one of it's derivates).
Most tutorials show a final result of something like this:
var step1 = new Step($elem); | |
// an example handler funciton | |
var highlightStep = function(){ | |
this.$elem.addClass('highlight'); | |
} | |
step1.addHandler(highlightStep); |
.config(['spSiteProvider',function(spSiteProvider){ | |
spSiteProvider.siteSvcUrl('https://myspsite.com/_vti_bin/listdata.svc') | |
}]) |
var app = angular.module('app',['ui.router']);
app.service('api',function($http){
var user,autherror, apihost, requestpath;
return {
authorize:function(){
var deferred = $q.defer();
deferred.promise = $http.get(apihost+'/'+requestpath) //$http returns a promise object
.success(function(data){
#!/usr/bin/env python | |
""" | |
This script helps migrating issues from Bitbucket to GitHub. | |
It currently ignores milestones completly and doesn't care whether an issue is | |
open, new or on hold. As long as it's not closed it's considered open. | |
To use it, install python-bitbucket, PyGithub and ipdb. |
<head> | |
<script src="jquery.js"></script><!-- use .js for easier DOM manipulation, can be done without, using the native DOM api --> | |
<script src="selection-map.js"></script> | |
</head> | |
<body> | |
<!-- select name="" values will be used inside the map object to initialize watch --> | |
<!-- the custom data-selmap-cascade="" property initializes the dynamic functionality, and the value should be an |
##Online Wishlists
Dog Stuff