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
var AWS = require('aws-sdk'); | |
var mysql = require('mysql'); | |
// KMSにより暗号化したMySQL接続用のパスワード文字列 | |
var kmsEncyptedToken = "CiC*********(KMSで暗号化したMySQL接続用のパスワード文字列)***********UI="; | |
// 接続先のMySQLサーバ情報 | |
var mysql_host = "example-rds-mysql-server.carvmoii2uds.ap-northeast-1.rds.amazonaws.com"; | |
var mysql_user = "example_user"; | |
var mysql_dbname = "exampledb"; |
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
/** | |
* This is a simple AWS Lambda function that will look for a given file on S3 and return it | |
* passing along all of the headers of the S3 file. To make this available via a URL use | |
* API Gateway with an AWS Lambda Proxy Integration. | |
* | |
* Set the S3_REGION and S3_BUCKET global parameters in AWS Lambda | |
* Make sure the Lambda function is passed an object with `{ pathParameters : { proxy: 'path/to/file.jpg' } }` set | |
*/ | |
var AWS = require('aws-sdk'); |
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
// dependencies | |
var async = require('async'); | |
var path = require('path'); | |
var AWS = require('aws-sdk'); | |
var gm = require('gm').subClass({ | |
imageMagick: true | |
}); | |
var util = require('util'); | |
var LambdaWatermark = require('lambda-watermark'); |
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
<header> | |
<h1>Super duper best blog ever</h1> | |
<nav> | |
<a href="/">Home</a> | |
<a href="/about">About</a> | |
<a href="/archive">Archive</a> | |
</nav> | |
</header> | |
<main> | |
<article> |
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
[...] | |
<div class="wrapper"> | |
<header> | |
<h1>Logo</h1> | |
<nav> | |
<ul> | |
<li><a href="link-1.html">Link 1</a></li> | |
<li><a href="link-2.html">Link 2</a></li> | |
<li><a href="link-3.html">Link 3</a></li> | |
</ul> |
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'; | |
var cacheVersion = 1; | |
var currentCache = { | |
offline: 'offline-cache' + cacheVersion | |
}; | |
const offlineUrl = 'offline.html'; | |
this.addEventListener('install', event => { | |
event.waitUntil( |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
SUMMARY: | |
- Structure: NML2 SNI Text | |
- Based On: NAR v1.2_1, NML2 v2.1_1 | |
AUTHOR: thomsonreuters.com | |
--> | |
<!-- ========================================================= --> | |
<newsMessage xmlns="http://iptc.org/std/nar/2006-10-01/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rtr="http://www.reuters.com/ns/2003/08/content" xmlns:x="http://www.w3.org/1999/xhtml"> |
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
.player-container { | |
background-color: black; | |
} | |
.player-minimize .player-position { | |
background-color: white; | |
border-radius: 2px; | |
bottom: 20px; | |
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.25); | |
left: 20px; |
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
When performing security research or connecting over untrusted networks, it’s often useful to tunnel connections through a VPN in a public cloud. This approach helps conceal your origin and safeguard your traffic, contributing to OPSEC when interacting with malicious infrastructure or traversing hostile environments. | |
One way to accomplish this is to set up your own VPN server, as an alternative to relying on a commercial VPN service. The following tutorial explains how to deploy the Algo VPN software bundle on DigitalOcean (the link includes my referral code). I like using DigitalOcean for this purpose because it offers virtual machines (VMs) for as little as $5 per month; also, I find it easier to use than other cloud services. | |
Algo VPN Overview | |
Algo VPN is an open-source software bundle designed for self-hosted VPN services. It was designed by the folks at Trail of Bits to be easy to deploy, rely only on modern protocols and ciphers, and provide reasonable security defaults. Also, it doesn’t require dedic |
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
# The following script will deploy a Laravel 5 applicaion on AWS Elastic Beanstalk. | |
# Add to .ebextensions at the root of your application and name your commands file (e.g., commands.config) | |
# -------------------------------- Commands ------------------------------------ | |
# Use "commands" key to execute commands on the EC2 instance. The commands are | |
# processed in alphabetical order by name, and they run before the application | |
# and web server are set up and the application version file is extracted. | |
# ------------------------------------------------------------------------------ | |
commands: | |
01updateComposer: |