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
function compute(computation, ...message) { | |
const delegate = () => { | |
onmessage = ({ data: { computation, message } }) => { | |
const wrapper = (fn) => Function('"use strict"; return (' + fn.toString() + ')')(); | |
const result = wrapper(computation)(...message); | |
postMessage(result); | |
}; | |
} | |
const functionBody = delegate.toString().replace(/^[^{]*{\s*/, '').replace(/\s*}[^}]*$/, ''); | |
return new Promise((resolve, reject) => { |
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
# Download and install .NET assembly at: https://winscp.net/eng/downloads.php#additional | |
# This process will send SNS notifications upload upload failure. | |
# Define connection parameters and globals | |
$server = '<127.0.0.1>' | |
$sftpUser = '<sftp_user>' | |
$ssmParam = '<sftp_password>' | |
$awsRegion = '<us-east-1>' | |
$snsTopic = '<sns_topic>' | |
$snsSubject = 'An error has occurred in production SFTP[IAM]' | |
$sftp_pass = (Get-SSMParameter -Region $awsRegion -Name $ssmParam -WithDecryption $true).Value |
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
#It's not directly mentioned in the documentation on how to do this, so here you go. This command will tunnel everything including DNS: | |
sshuttle --dns -vr [email protected] 0/0 --ssh-cmd 'ssh -i /your/key/path.pem' |