A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
/* | |
|-------------------------------------------------------------------------- | |
| GlobalLoaderService | |
|-------------------------------------------------------------------------- | |
| | |
| Global Loader Factory, use for fancy effect when saving, loading, deleting | |
| | |
*/ | |
var GlobalLoaderService = function () {}; |
var SerialPort = require('serialport').SerialPort; | |
var xbee_api = require('xbee-api'); | |
var C = xbee_api.constants; | |
var Q = require('q'); | |
// following settings work for me on my Raspberry pi, your config may differ! | |
var xbeeAPI = new xbee_api.XBeeAPI({ | |
api_mode: 1 | |
}); | |
var serialport = new SerialPort("/dev/ttyAMA0", { |
// Intercepting HTTP calls with AngularJS. | |
angular.module('MyApp', []) | |
.config(function ($provide, $httpProvider) { | |
// Intercept http calls. | |
$provide.factory('MyHttpInterceptor', function ($q) { | |
return { | |
// On request success | |
request: function (config) { | |
// console.log(config); // Contains the data about the request before it is sent. |
http://jsfiddle.net/brendanowen/uXbn6/8/ | |
<script type="text/ng-template" id="tree_item_renderer.html"> | |
{{data.name}} | |
<button ng-click="add(data)">Add node</button> | |
<button ng-click="delete(data)" ng-show="data.nodes.length > 0">Delete nodes</button> | |
<ul> | |
<li ng-repeat="data in data.nodes" ng-include="'tree_item_renderer.html'"></li> | |
</ul> | |
</script> |
'use strict'; | |
angular.module('app') | |
.controller('CreateWorkflowCtrl', function($scope, $location, Workflow, Category) { | |
$scope.workflow = new Workflow(); | |
$scope.page = 0; | |
$scope.create = function() { | |
$scope.workflow.$save(function(data) { | |
$location.path("/workflow/" + data.id); |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>SoundCloud OAuth 2 User Agent Authentication Flow Demo</title> | |
<script type="text/javascript" charset="utf-8" src="javascript/jquery-1.4.2.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
$(function () { | |
var extractToken = function(hash) { |
#!/bin/sh | |
# Must have boot2docker installed if using Mac OS X | |
installMachineMac() { | |
sudo wget --no-check-certificate -O /usr/local/bin/docker-machine http://docker-machine-builds.evanhazlett.com/latest/docker-machine_darwin_amd64 | |
sudo chmod +x /usr/local/bin/docker-machine | |
} | |
installDockerBinMac(){ | |
sudo wget --no-check-certificate -O /usr/local/bin/docker https://get.docker.com/builds/Darwin/x86_64/docker-latest |