1.Simply add the deploy.sh to your application folder
2.Start your service
deploy.sh start myApp.js
// MY_KEY=test\ntest2\ntest3 | |
JSON.parse(`"${process.env.MY_KEY}"`) | |
/* | |
test | |
test2 | |
test3 | |
*/ |
git filter-branch --env-filter ' | |
OLD_EMAIL="your-old-email@example.com" | |
CORRECT_NAME="Your Correct Name" | |
CORRECT_EMAIL="your-correct-email@example.com" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" | |
fi | |
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] |
var params = { | |
TableName: 'MYTABLE', | |
FilterExpression: 'contains (myKey , :query)', | |
ExpressionAttributeValues: { | |
':query': query | |
} | |
} | |
var dynamoScan = new Promise(function(resolve, reject) { | |
var results = [] |
<% | |
Function InArray(Needle, Haystack) | |
Dim i, x | |
InArray = False | |
For i = 0 To Ubound(Haystack) | |
If IsArray(Needle) = True Then | |
For x = 0 To Ubound(Needle) | |
If Trim(Haystack(i)) = Trim(Needle(x)) Then | |
InArray = True |
aws s3api list-objects --bucket BUCKETNAME --output json --query "[sum(Contents[].Size), length(Contents[])]" |
/* | |
filepreview : A file preview generator for node.js | |
*/ | |
var child_process = require('child_process'); | |
var crypto = require('crypto'); | |
var async = require('async'); | |
var path = require('path'); |
fs.appendFile('message.txt', 'data to append', function (err) { | |
if (err) throw err; | |
console.log('Saved!'); | |
}); |
module.exports= function parseKeywords(req, res, next){ | |
const { q } = res.locals | |
//extract double quote terms | |
const re = /"(.*?)"/g | |
const phrases = [] | |
let current | |
while ((current = re.exec(q))) { | |
phrases.push(current.pop()) | |
} | |
//replace -_. with space for matches |
proxy_cache_path /var/cache/nginx/cache levels=1:2 keys_zone=cache:8m max_size=3000m inactive=600m; | |
proxy_temp_path /var/tmp; | |
# the IP(s) on which your node server is running. I chose port 3000. | |
upstream app_the_scratch { | |
server 127.0.0.1:3000 weight=1 fail_timeout=60s; | |
} | |
# the nginx server instance | |
server { |