- TODO
- TODO
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
function binaryblob(){ | |
var byteString = atob(document.querySelector("canvas").toDataURL().replace(/^data:image\/(png|jpg);base64,/, "")); | |
var ia = new Uint8Array(ab); | |
for (var i = 0; i < byteString.length; i++) { | |
ia[i] = byteString.charCodeAt(i); | |
} | |
var dataView = new DataView(ab); | |
var blob = new Blob([dataView], {type: "image/png"}); | |
var DOMURL = self.URL || self.webkitURL || self; | |
var newurl = DOMURL.createObjectURL(blob); |
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
angular.module('myMod').factory('tabsData', function (localStorageService) { | |
var Factory = {}, | |
keyReg = /^tab-(\d+-\d+)$/; | |
/** | |
* get all tabs data | |
* @return array | |
**/ | |
Factory.all = function () { | |
var keys = localStorageService.keys(), | |
ret = []; |
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
// Hat tip Mike Bostock: https://github.com/mbostock/polymaps/blob/master/examples/bounds/bounds.js | |
function bounds(features) { | |
var i = -1, | |
n = features.length, | |
geometry, | |
bounds = [{lon: Infinity, lat: Infinity}, {lon: -Infinity, lat: -Infinity}]; | |
while (++i < n) { | |
//geometry = features[i].data.geometry; | |
geometry = features[i].geometry; |
echo 'alias gr="git log --graph --full-history --all --color --pretty=tformat:\"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s%x20%x1b[33m(%an)%x1b[0m;\""' >> ~/.bashrc
echo 'alias grd="git log --graph --full-history --all --color --pretty=tformat:\"%x1b[31m%h%x09%x1b[36m%ad%x1b[32m%d%x1b[0m%x20%s%x20%x1b[33m(%an)%x1b[0m;\" --date=iso"' >> ~/.bashrc
NewerOlder