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
Show hidden characters
{ | |
"presets": ["es2015"], | |
"plugins": ["transform-runtime"] | |
} |
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
ORG=PRIVATE_ORG; PAGE=1; | |
curl "https://api.github.com/orgs/$ORG$/repos?page=1&per_page=100" | | |
grep -e 'ssh_url*' | | |
cut -d \" -f 4 | | |
xargs -L1 git clone | |
USER=USERNAME; PAGE=1; | |
curl "https://api.github.com/users/$USER$/repos?page=1&per_page=100" | | |
grep -e 'ssh_url*' | |
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
#!/bin/bash | |
yum update -y | |
mkdir /var/www | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash | |
. ~/.nvm/nvm.sh | |
nvm install 8.6.0 | |
node -e "console.log('Running Node.js ' + process.version)" | |
n=$(which which node);n=${n%/bin/node}; chmod -R 755 $n/bin/*; sudo cp -r $n/{bin,lib,share} /usr/local |
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
#!/bin/bash | |
yum update -y | |
echo "Node Linux Installer by www.github.com/taaem" | |
echo "Need Root for installing NodeJS" | |
sudo su -c 'echo "Got Root!"' | |
echo "Get Latest Version Number..." | |
{ | |
wget --output-document=node-updater.html https://nodejs.org/dist/latest/ |
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
rsync --no-perms --omit-dir-times --delete -vr -e "ssh -i /home/teamcity/.ssh/id_rsa_custom" --timeout=1000 --log-file=/tmp/rsyncd.log ./build/ ci@server:/var/www/build/ | |
rsync --no-perms --omit-dir-times -vr -e "ssh -i /home/teamcity/.ssh/id_rsa_custom" --timeout=1000 --log-file=/tmp/rsyncd.log ./node_modules/ ci@server:/var/www/node_modules/ | |
rm -f .env.production.local | |
cat >.env.production.local <<'EOL' | |
AAA=VVVV/ | |
BBB=XXXX | |
EOL | |
cat .env.production.local |
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
cd xxx | |
wget https://download.microsoft.com/download/5/F/0/5F0362BD-7D0A-4A9D-9BF9-022C6B15B04D/dotnet-runtime-2.0.0-linux-x64.tar.gz | |
sudo mkdir -p /opt/dotnet && sudo tar zxf dotnet-runtime-2.0.0-linux-x64.tar.gz -C /opt/dotnet | |
sudo ln -s /opt/dotnet/dotnet /usr/local/bin |
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
echo off | |
Setlocal EnableDelayedExpansion | |
cls | |
SET "WWWROOT=C:\inetpub\wwwroot" | |
SET "SOURCES=deploy" | |
rem Using quotes around "var=value" in case the path may contain spaces | |
for /d %%a in ("%WWWROOT%\*") do ( | |
echo Copying : from : %SOURCES%, Target: %%a |
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
// --- Compiling --- | |
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
$ tar xzvf redis-2.8.3.tar.gz | |
$ cd redis-2.8.3 | |
$ make | |
$ make install | |
// --- or using yum --- | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
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
import json | |
import os | |
def ping(event, context): | |
ip1 = event['headers']['X-Forwarded-For'].split(',')[0] | |
ip2 = event['requestContext']['identity']['sourceIp'] | |
print('two different referring IP address parsing techniques ip1: %s and ip2: %s') % (ip1, ip2) | |
referringIP = event['requestContext']['identity']['sourceIp'] | |
#TODO: use a comma-delimited string to store multiple IP address values in the environment variable |
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
'use strict'; | |
var xoauth2 = require('xoauth2'); | |
var nodemailer = require('nodemailer'); | |
var smtp = require('nodemailer-smtp-transport'); | |
var htmlToText = require('nodemailer-html-to-text').htmlToText; | |
// Sending mail with Gmail using XOAuth2 | |
// http://masashi-k.blogspot.com.br/2013/06/sending-mail-with-gmail-using-xoauth2.html |
OlderNewer