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
<div style="padding:0;width:100%!important;margin:0" marginheight="0" marginwidth="0"> | |
<center> | |
<table cellpadding="8" cellspacing="0" style="padding:0;width:100%!important;background:#ffffff;margin:0;background-color:#ffffff" border="0"> | |
<tbody> | |
<tr> | |
<td valign="top"> | |
<table cellpadding="0" cellspacing="0" style="border-radius:4px;border:1px #dceaf5 solid" border="0" align="center"> | |
<tbody> | |
<tr> | |
<td colspan="3" height="6"></td> |
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 ContentEditable() { | |
String.prototype.sanitizeHTML = function(white, black) { | |
if (!white) white = "b|i|p|br|div"; //allowed tags | |
if (!black) black = "script|object|embed"; //complete remove tags | |
var e = new RegExp("(<(" + black + ")[^>]*>.*</\\2>|(?!<[/]?(" + white + ")(\\s[^<]*>|[/]>|>))<[^<>]*>|(?!<[^<>\\s]+)\\s[^</>]+(?=[/>]))", "gi"); | |
return this.replace(e, ""); | |
} | |
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
/** | |
* API Response Caching System | |
* This module creates a global variable called 'apicache' and makes it available throughout. | |
*/ | |
(function() { | |
/** | |
* | |
* Variables to store our XMLHttpRequest object methods | |
*/ |
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
scp -i admin.pem [email protected]:/opt/dbbackup/11_22_2016_11_10_53_alldbs_..tar.gz /opt/ |
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
sudo apt-get install curl | |
curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash - | |
sudo apt-get install nodejs |
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 request = require('request'); | |
var schedule = require('node-schedule'); | |
var firebase = require('firebase'); | |
var app = firebase.initializeApp({ | |
apiKey: "AIzaSyB1mr1VzndsFlKzNLHLlVtMKmOTXaUAM94", | |
authDomain: "squirreltask.firebaseapp.com", | |
databaseURL: "https://squirreltask.firebaseio.com", | |
storageBucket: "squirreltask.appspot.com", | |
messagingSenderId: "302372771732" | |
}); |
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
<VirtualHost *> | |
ServerName example.com | |
WSGIDaemonProcess www user=max group=max threads=5 | |
WSGIScriptAlias / /home/max/Projekte/flask-upload/flask-upload.wsgi | |
<Directory /home/max/Projekte/flask-upload> | |
WSGIProcessGroup www | |
WSGIApplicationGroup %{GLOBAL} | |
Order deny,allow |
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
if (window.location.search) { | |
var qs = window.location.search.split('+').join(' '); | |
var params = {}, | |
tokens, | |
re = /[?&]?([^=]+)=([^&]*)/g; | |
while (tokens = re.exec(qs)) { | |
params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]); | |
} |
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 restify = require('restify'); | |
var server = restify.createServer(); | |
server.use(restify.bodyParser()); | |
function corsHandler(req, res, next) { | |
res.setHeader('Access-Control-Allow-Origin', '*'); | |
res.setHeader('Access-Control-Allow-Headers', 'Origin, Accept, Accept-Version, Content-Length, Content-MD5, Content-Type, Date, X-Api-Version, X-Response-Time, X-PINGOTHER, X-CSRF-Token,Authorization'); | |
res.setHeader('Access-Control-Allow-Methods', '*'); | |
res.setHeader('Access-Control-Expose-Headers', 'X-Api-Version, X-Request-Id, X-Response-Time'); |
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
Install connect and serve-static with NPM | |
$ npm install connect serve-static | |
Create server.js file with this content: | |
var connect = require('connect'); | |
var serveStatic = require('serve-static'); | |
connect().use(serveStatic(__dirname)).listen(8080, function(){ | |
console.log('Server running on 8080...'); |
OlderNewer