image: dnxsolutions/musketeers:1.1.1-ecr | |
services: | |
- docker:18.03.1-ce-dind # needs to match gitlab runner version | |
variables: | |
DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_DRIVER: overlay2 | |
AWS_DEFAULT_REGION: ap-southeast-2 | |
AWS_HOSTED_ZONE: dev.cloud.example.com.au |
/** | |
* BTC-e JavaScript Trading API | |
* https://btc-e.com/api/documentation | |
* | |
* Author: jsCoin | |
* BTC : 151vumzopVBZMV9CtswFiumQBbEHcULPnG | |
* LTC : Laoq3qsLvQFCnnbfcFGpQyjy5kcK58bpen | |
* | |
* Dependencies: | |
* jQuery - http://jquery.com/ |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.4.7 (MingW32) | |
mQGiBEkJ+qcRBADKDTcZlYDRtP1Q7/ShuzBJzUh9hoVVowogf2W07U6G9BqKW24r | |
piOxYmErjMFfvNtozNk+33cd/sq3gi05O1IMmZzg2rbF4ne5t3iplXnNuzNh+j+6 | |
VxxA16GPhBRprvnng8r9GYALLUpo9Xk17KE429YYKFgVvtTPtEGUlpO1EwCg7FmW | |
dBbRp4mn5GfxQNT1hzp9WgkD/3pZ0cB5m4enzfylOHXmRfJKBMF02ZDnsY1GqeHv | |
/LjkhCusTp2qz4thLycYOFKGmAddpVnMsE/TYZLgpsxjrJsrEPNSdoXk3IgEStow | |
mXjTfr9xNOrB20Qk0ZOO1mipOWMgse4PmIu02X24OapWtyhdHsX3oBLcwDdke8aE | |
gAh8A/sHlK7fL1Bi8rFzx6hb+2yIlD/fazMBVZUe0r2uo7ldqEz5+GeEiBFignd5 |
function keepTrying(otherArgs, promise) { | |
promise = promise||new Promise(); | |
// try doing the important thing | |
if(success) { | |
promise.resolve(result); | |
} else { | |
setTimeout(function() { | |
keepTrying(otherArgs, promise); |
If your EC2 instances in AWS are managed through Auto Scaling Groups, it is easy to schedule startup and shutdown of those instances, e.g. to save money.
This tutorial walks you through setting up an AWS Lambda function that is triggered by CloudWatch Events and automatically changes the min, max and desired instances in your Auto Scaling Group(s).
The idea is to toggle between 0 (stop
) and a specifed min, max and desired amount of instances (start
), so you only need a single Lambda function. The premise is that you do not touch these Auto Scaling Group settings manually, or you might make your EC2 instances nocturnal.
Advice: if you have style guide / policy, apply it automatically ( in the editor or git hook ) https://github.com/jshint/fixmyjs
Collection of (mostly) JS styles (pick one you like or write another one if none fits you)
- list of lists: http://www.jstherightway.org/
// scraped from https://mariadb.com/kb/en/mariadb/documentation/sql-language-structure/mariadb-error-codes/ | |
// | |
module.exports = [ | |
[ | |
"1000", | |
"HY000", | |
"ER_HASHCHK", | |
"hashchk" | |
], | |
[ |
Thanks to React hooks you have now happily turned all your classes into functional components.
Wait, all your components? Not quite. There is one thing that can still only be implemented using classes: Error boundaries.
There is just no functional equivalent for componentDidCatch
and deriveStateFromError
yet.
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would