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
'use strict'; | |
const HTTP = require('http'), | |
HTTPS = require('https'), | |
PROTOCOL = { | |
HTTP: 'http:', | |
HTTPS: 'https:' | |
}; | |
function request (opts, data) { |
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
facebook.com | |
facebook.net | |
fb.com | |
fb.net | |
fb.me | |
fbcdn.com | |
fbcdn.net | |
fbsbx.com | |
fbsbx.net | |
fburl.com |
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
use Crypt::Eksblowfish::Bcrypt qw(bcrypt en_base64); | |
use Data::Entropy::Algorithms qw(rand_bits); | |
my $bcrypt_cost = 12; | |
sub encrypt_password { | |
my $password = shift; | |
my $salt = en_base64(rand_bits(16*8)); | |
my $settings = '$2a'.'$'.$bcrypt_cost.'$'.$salt; | |
return bcrypt($password, $settings); |
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
NAME = test-app | |
VERSION = latest | |
TEST_AWS = 111111111111 | |
STAGE_AWS = 222222222222 | |
PROD_AWS = 333333333333 | |
AWS_ECR_DOMAIN = dkr.ecr.eu-west-1.amazonaws.com | |
# Start DO NOT EDIT SECTION |
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 getRandomHour(startHour, endHour) { | |
if (startHour > 23 || endHour > 23) { | |
throw new Error('Illegal range'); | |
} | |
if (startHour < 0 || endHour < 0) { | |
throw new Error('Illegal range'); | |
} | |
if (startHour === endHour) { |
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
/** | |
* @author Jose Nidhin | |
*/ | |
'use strict'; | |
/** | |
* Using Table Mapping with an Task to Select and Filter Data | |
* https://docs.aws.amazon.com/dms/latest/userguide/CHAP_Tasks.CustomizingTasks.TableMapping.html#CHAP_Tasks.CustomizingTasks.TableMapping.SelectionTransformation | |
*/ |
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
# assumes libapache2-modsecurity is installed | |
# Reference Mannual - https://github.com/SpiderLabs/ModSecurity/wiki | |
SecRuleEngine On | |
<LocationMatch "^/.*"> | |
# initialise the state based on X-Forwarded-For ip address | |
SecRule REQUEST_HEADERS:X-Forwarded-For "@unconditionalMatch" "phase:2,initcol:ip=%{MATCHED_VAR},pass,nolog,id:100" |
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
http { | |
server { | |
listen 80; | |
server_name localhost; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
root /var/www; | |
location /auth_server { |
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
{ | |
"objects": [ | |
{ | |
"schedule": { | |
"ref": "DefaultSchedule" | |
}, | |
"writeThroughputPercent": "0.95", | |
"dataFormat": { | |
"ref": "DynamoDBDataFormatId_suGD7" | |
}, |
NewerOlder