ssh ec2-user@IP
aws configure set region us-west-2
aws s3 ls # listing s3 buckets over VPC endpoint privately
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
#!/bin/bash | |
if [ $USER = "oracle" ]; then | |
if [ $SHELL = "/bin/ksh" ]; then | |
ulimit -p 16384 | |
ulimit -n 65536 | |
else | |
ulimit -u 16384 -n 65536 | |
fi | |
fi |
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 http = require('http'), | |
httpProxy = require('http-proxy'), | |
express = require('express'); | |
// create a server | |
var app = express(); | |
var proxy = httpProxy.createProxyServer({ target: 'http://localhost:8080', ws: true }); | |
var server = require('http').createServer(app); | |
// proxy HTTP GET / POST |
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
/* | |
Implement a function that allows for infinite cyrring, and can be used as such: | |
`_do(fn)(2)(3)(5)(8)(22)(230)(100)(10)();` | |
*/ | |
function _do(fn) { | |
var args = [] | |
, fn; |
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
#!/bin/bash | |
# Original by LEXO, http://www.lexo.ch | |
# Link: https://www.lexo.ch/blog/2013/01/linux-bash-shell-script-for-recursively-converting-all-files-with-various-charsets-in-a-directory-into-utf-8-shell-skript-fur-das-rekursive-konvertieren-von-allen-files-in-einem-verzeichnis-mit-belie/ | |
# Changed by Johannes Berdin, http://johannesberdin.de | |
# for running under Mac OS X | |
# | |
# Version 1.0 | |
# | |
# This bash script converts all files from within a given directory from any charset to UTF-8 recursively |
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 download = function( arrayBuffer ) { | |
var $a = document.createElement( 'a' ); | |
$a.setAttribute( 'download', +new Date() + '.bmp' ); | |
$a.setAttribute( 'href', URL.createObjectURL( new Blob( [ arrayBuffer ], { type: 'application/octet-binary' } ) ) ); | |
$a.style.display = 'none'; | |
document.body.appendChild( $a ); | |
$a.click(); | |
document.body.removeChild( $a ); | |
} |
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
#!/bin/sh -e | |
# | |
# NOTE: Since Docker 1.10 (February 4, 2016), it has been possible to configure the | |
# Docker daemon using a JSON config file. On Linux, this file is normally located at | |
# /etc/docker/daemon.json. You should use this JSON config method if you are running | |
# a version of Docker that is at least 1.10! | |
# Here is an example configuration that sets the docker0 bridge IP to 192.168.254.1/24: | |
# { | |
# "bip": "192.168.254.1/24" | |
# } |
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
#!/bin/sh | |
SHELLDIR=`dirname ${0}` | |
SHELLDIR=`cd ${SHELLDIR}; pwd` | |
SHELLNAME=`basename $0` | |
LOG_DIR="/var/log" | |
LOG_SAVE_PERIOD=14 | |
LOG_FILE="${LOG_DIR}/${SHELLNAME}.log" | |
AZ=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone` |
Parse an svg path object and generate an Array of path commands. Each command is an Array of the form [command, arg1, arg2, ...]
NOTE: parsing is done via pathSegList
which is faster and more reliable than parsing the path string directly, but might not work in old browsers.