$ uname -r
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Load all files from directory and upload</title> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=11" /> | |
<meta name="format-detection" content="telephone=no" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> | |
<meta name="robots" content="all,follow" /> |
This file contains 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
/** | |
* Simple XML parser | |
* @param {String} xml | |
* @return {Object} | |
*/ | |
function parseXML(xml) { | |
var beg = -1; | |
var end = 0; | |
var tmp = 0; |
This file contains 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
require('total4'); | |
CORS(); | |
ROUTE('POST /*', function() { | |
var self = this; | |
switch (self.url) { | |
case '/api/v1/ott-dummy/heartbeat/': | |
case '/api/v1/ott-dummy/view/': | |
self.plain('OK'); |
This file contains 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
//require('../index'); | |
// CONF.table_users = 'id:uid,name:string,dtcreated:date'; | |
// TABLE('users').find().callback(console.log); | |
// TABLE('users').insert({ id: UID(), name: 'Peter', dtcreated: NOW }); | |
const DELIMITER = '\0'; | |
const Fs = require('fs'); | |
const Path = require('path'); |
This file contains 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
String.prototype.parseTransform = function() { | |
var prop = ['translate', 'matrix', 'rotate', 'skewX', 'skewY', 'scale']; | |
var val = this.match(/(translate|matrix|rotate|skewX|skewY|scale)\(.*?\)/g); | |
var obj = {}; | |
if (val) { | |
for (var i = 0, length = val.length; i < length; i++) { | |
var item = val[i]; | |
var index = item.indexOf('('); | |
var v = item.substring(index + 1, item.length - 1).split(/\,|\s/); | |
var n = item.substring(0, index); |
This file contains 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
ROUTE('-POST /create/ *Create --> @create'); | |
NEWSCHEMA('Create', function(schema) { | |
schema.define('gender', ['male', 'female'], true); | |
schema.define('reference', String); | |
schema.define('firstname', 'Capitalize(30)', true); | |
schema.define('lastname', 'Capitalize(30)', true); | |
schema.define('position', 'String(30)'); |
This file contains 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 request_proxy(options, callback) { | |
var proxy = options.proxy; | |
proxy.path = options.uri.hostname; | |
proxy.headers = { host: options.uri.hostname }; | |
if (proxy.auth) | |
proxy.headers['Proxy-Authorization'] = 'Basic ' + U.createBuffer(proxy.auth).toString('base64'); | |
var req = Https.request(proxy); |
This file contains 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
const Crypto = require('crypto'); | |
require('total.js'); | |
function DocumentDB(hostname, key) { | |
this.hostname = hostname; | |
this.key = key; | |
this.attempts = 0; | |
this.expiration = '10 minutes'; | |
} |
This file contains 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
// A simple SVG animation | |
$.fn.transform = function(obj, duration, easing, complete) { | |
var REG_TRANSFORM = /\}(?=\w)/g; | |
var REG_ROTATE = /[-0-9\.\s]+/; | |
var REG_TRANSLATE = /[-0-9\.]+(\,|\s)?[-0-9\.]+/; | |
var REG_SCALE = /[0-9\.]+/; | |
var REG_SKEW = /[-0-9\.]+/; | |
if (typeof(easing) === 'function') { |
NewerOlder