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
# .ebextensions/01_install_yarn.config | |
files: | |
'/opt/elasticbeanstalk/hooks/appdeploy/pre/49install_yarn.sh' : | |
mode: '000755' | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
set -euxo pipefail |
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
# props: https://stackoverflow.com/questions/3515597/add-only-non-whitespace-changes#answer-7149602 | |
git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero |
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
/*! | |
* @fileOverview Finance Excel Rate Formula Javascript Equivalent | |
* @version 1.0.0 | |
* | |
* @author Burak Arslan @kucukharf http://www.github.com/kucukharf | |
* @license | |
* Copyright (c) 2010-2018 Burak Arslan | |
* Licensed under Creative Commons (CC) license | |
* @usage RATE($periods, $payment, $present, $future, $type, $guess) | |
*/ |
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
openssl req -new -newkey rsa:2048 -nodes -keyout yourdomain.key -out yourdomain.csr | |
http://support.godaddy.com/help/article/3601/generating-a-certificate-signing-request-nginx | |
http://support.godaddy.com/help/article/4976/rekeying-an-ssl-certificate | |
# Be sure to remember to chain them! | |
cat gd_bundle-g2-g1.crt >> yourdomain.crt | |
# Move 'em | |
sudo mv yourdomain.crt /etc/ssl/certs/yourdomain.crt |
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
/** | |
* Created by gonchub on 19/03/14. | |
*/ | |
function keysToLowerCase(obj) { | |
if (!typeof(obj) === "object" || typeof(obj) === "string" || typeof(obj) === "number" || typeof(obj) === "boolean") { | |
return obj; | |
} | |
var keys = Object.keys(obj); | |
var n = keys.length; | |
var lowKey; |
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
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
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
// Doing AES-256-CBC (salted) decryption with node.js. | |
// This code is based on http://php.net/manual/de/function.openssl-decrypt.php and works with PHP sqAES. | |
// | |
// Create your encrypted data with | |
// echo -n 'Hello world' | openssl aes-256-cbc -a -e | |
var crypto = require('crypto'); | |
var password = 'password'; | |
var edata = 'U2FsdGVkX18M7K+pELP06c4d5gz7kLM1CcqJBbubW/Q='; |
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 i in `git status -s | sed -e 's/^.* //'`; do php -l $i; done |