Data URI manipulation made easy.
This isn't very robust, and will reject a number of valid data URIs. However, it meets the most useful case: a mimetype, a charset, and the base64 flag.
(function (){ | |
jQuery.fn.highlight = function (text, o) { | |
return this.each( function(){ | |
var replace = o || '<span class="highlight">$1</span>'; | |
$(this).html( $(this).html().replace( new RegExp('('+text+'(?![\\w\\s?&.\\/;#~%"=-]*>))', "ig"), replace) ); | |
}); |
(function () { | |
'use strict'; | |
var angularApp = angular.module("angularApp", ['restangular']); | |
angularApp.config(['$httpProvider', function($httpProvider){ | |
$httpProvider.defaults.useXDomain = true; | |
$httpProvider.defaults.withCredentials = true; | |
delete $httpProvider.defaults.headers.common['X-Requested-With']; |
<script> | |
var djangoConfig = { | |
staticUrl : '{{STATIC_URL}}' | |
}; | |
var getStaticPath = function(url){ | |
return djangoConfig.staticUrl + url; | |
}; | |
</script> |
#!/bin/sh | |
KEY="$HOME/.ssh/id_rsa.pub" | |
if [ ! -f ~/.ssh/id_rsa.pub ];then | |
echo "private key not found at $KEY" | |
echo "* please create it with "ssh-keygen -t dsa" *" | |
echo "* to login to the remote host without a password, don't give the key you create with ssh-keygen a password! *" | |
exit | |
fi |
Deploy Django-Nginx-uwsgi pada web faction | |
referensi: http://community.webfaction.com/questions/10242/installing-nginx-uwsgi | |
APPNAME="tracker" | |
/home/narayana/webapps/tracker | |
bin | |
start | |
stop |
<script> | |
// manually bootstrapping app in order to have cordova (And plugins loaded) ready to go | |
// (remove the "ng-app" attribute from your markup) | |
angular.element(document).ready(function() { | |
if (window.cordova) { | |
document.addEventListener('deviceready', function() { | |
angular.bootstrap(document.body, ['starter']); | |
}, false); | |
} else { | |
angular.bootstrap(document.body, ['starter']); |
#museums{ | |
marker-fill: red; | |
} |
mogrify -path getjar/ -resize 480x -gravity center -background black -extent 480x800 -format png amazon/*.png |
SELECT pg_database.datname, | |
pg_size_pretty(pg_database_size(pg_database.datname)) AS size | |
FROM pg_database; |