I hereby claim:
- I am avimar on github.
- I am avimarcus (https://keybase.io/avimarcus) on keybase.
- I have a public key whose fingerprint is 1AFA CC40 32FD 2FE9 BCE3 88FE D5DD 1501 34E0 ABD8
To claim this, I am signing this object:
var myURL="mydomain.com"; | |
var restifyOptions={} | |
restifyOptions.certificate = fs.readFileSync('PathTo:fullchain.pem'); | |
restifyOptions.key = fs.readFileSync('PathTo:privkey.pem'); | |
var server = restify.createServer(restifyOptions); | |
var nonSecure = restify.createServer({name: 'redirectToSSL'}); | |
nonSecure.get(/.*/,function (req, res, next) { | |
res.redirect(301, 'https://' + myURL + req._url.href, next); |
var _putItem = function (item, shouldCreateNewItem, shouldReturnInformationFromJoinedTable) { | |
return knex(...).update() | |
.then(function(affectedRows) { | |
if (affectedRows == 0 && shouldCreateNewItem) return knex.insert(...); | |
else if (shouldReturnInformationFromJoinedTable) return knex(...). ....leftJoin(..).select().first() | |
else return true; | |
}) | |
} |
var NorthAmerica=require('./NorthAmerica.json'); | |
var fp = require('lodash/fp'); | |
function getRegionForAreaCode(areaCode){ | |
return fp.findKey(function(o) { | |
return o.includes(areaCode); | |
})(NorthAmerica); | |
} |
freeswitch-build: | |
pkg: | |
- installed | |
- names: | |
- build-essential | |
- curl | |
- wget | |
- autoconf | |
- automake | |
- libtool |
I hereby claim:
To claim this, I am signing this object:
`show create table logs_fs` | |
CREATE TABLE `logs_fs` ( | |
`uuid` char(36) DEFAULT NULL, | |
`host` varchar(4) DEFAULT NULL, | |
`date` datetime(6) NOT NULL, | |
`hrtime` bigint(20) unsigned NOT NULL, | |
`level` tinyint(4) DEFAULT NULL, | |
`value` text, | |
KEY `uuid` (`uuid`), |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
Sample file. |
#! /usr/bin/node | |
var nodemailer = require("nodemailer"); | |
var transport = nodemailer.createTransport("sendmail"); | |
function fix_len(num, len){ | |
if(len<=5) return ("00000" + num).slice(-len); | |
else { | |
var seed="0000000000"; | |
while(seed.length<len) seed+=seed; |