myApp.factory('Excel',function($window){
var uri='data:application/vnd.ms-excel;base64,',
template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
base64=function(s){return $window.btoa(unescape(encodeURIComponent(s)));},
format=function(s,c){return s.replace(/{(\w+)}/g,function(m,p){return c[p];})};
return {
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
<script type="text/javascript" charset="utf-8"> | |
var cont = 1; | |
var pag = 0; | |
$(window).scroll(function () { | |
if(($(window).scrollTop() + $(window).height()) > ($('body').height() - 100) ){ | |
if(cont){ | |
$('.loding').removeClass('hide'); | |
setTimeout(function() { | |
$('.loding').addClass('hide'); | |
carregaPagina(pag); |
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
var ngAppElem = angular.element(document.querySelector('[ng-app]') || document); | |
ngAppElem.injector().get('$templateCache').get('template.html') |
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
<script type="text/javascript" src="http://pubnub.github.io/eon/lib/eon-map.js"></script> | |
<link type="text/css" rel="stylesheet" href="http://pubnub.github.io/eon/lib/eon.css" /> | |
<div id='map'></div> | |
<script type="text/javascript"> | |
eon.map({ | |
id: 'map', | |
mb_token: 'mapbox api token', | |
mb_id: 'mapbox map id', | |
subscribe_key: 'subscribe_key_here', | |
channel: 'my map channel' |
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
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
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
<?xml version="1.0"?> | |
<configuration> | |
<system.webServer> | |
<staticContent> | |
<mimeMap fileExtension=".json" mimeType="application/json" /> | |
<mimeMap fileExtension=".woff" mimeType="application/x-font-woff" /> | |
<mimeMap fileExtension=".woff2" mimeType="font/woff2" /> | |
</staticContent> | |
</system.webServer> |