Source: http://www.syahzul.com/2016/04/06/how-to-install-oci8-on-ubuntu-14-04-and-php-5-6/
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
/** | |
* For future use | |
* Handle Zip uploads through lambda | |
*/ | |
const AWS = require('aws-sdk') | |
const s3 = new AWS.S3() | |
const fileType = require('file-type') | |
const sha1 = require('sha1') | |
exports.handler = function(event, context) { |
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
prefix=/opt/oracle | |
includedir=${prefix}/instantclient_12_1/sdk/include | |
libdir=${prefix}/instantclient_12_1 | |
Name: oci8 | |
Description: Oracle Instant Client | |
Version: 12.1 | |
Cflags: -I${includedir} | |
Libs: -L${libdir} -lclntsh |
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
// This is from my comment here: http://wolfram.kriesing.de/blog/index.php/2008/javascript-remove-element-from-array/comment-page-2#comment-466561 | |
/* | |
* How to delete items from an Array in JavaScript, an exhaustive guide | |
*/ | |
// DON'T use the delete operator, it leaves a hole in the array: | |
var arr = [4, 5, 6]; | |
delete arr[1]; // arr now: [4, undefined, 6] |
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
########## Install NGINX ############## | |
# Install software-properties-common package to give us add-apt-repository package | |
sudo apt-get install -y software-properties-common | |
# Install latest nginx version from community maintained ppa | |
sudo add-apt-repository ppa:nginx/stable | |
# Update packages after adding ppa |
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
<?php | |
class ReconnectingPDO | |
{ | |
protected $dsn, $username, $password, $pdo, $driver_options; | |
public function __construct($dsn, $username = "", $password = "", $driver_options = array()) | |
{ | |
$this->dsn = $dsn; | |
$this->username = $username; | |
$this->password = $password; |
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
# RS256 | |
# private key | |
openssl genrsa -out rs256-4096-private.rsa 4096 | |
# public key | |
openssl rsa -in rs256-4096-private.rsa -pubout > rs256-4096-public.pem | |
# ES512 | |
# private key | |
openssl ecparam -genkey -name secp521r1 -noout -out ecdsa-p521-private.pem | |
# public key |
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
ssh-keygen -t rsa -b 4096 -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
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
module.exports = { | |
/* ... */ | |
modules: [ | |
['~/modules/sentry', { | |
public_key: '', | |
private_key: '', | |
project_id: '', | |
}], | |
], | |
/* ... */ |
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 { createProxyServer } from 'http-proxy'; | |
import url from 'url'; | |
import _ from 'lodash'; | |
module.exports = app => { | |
const proxy = createProxyServer(); | |
app.all('/api/v1/*', (req, res) => { | |
const path = _.drop(req.url.split('/'), 3); | |
proxy.proxyRequest(req, res, { | |
target: url.resolve('YOUR URL', path.join('/')), |
NewerOlder