Skip to content

Instantly share code, notes, and snippets.

View igorjs's full-sized avatar
🦝
Building Raccoon Lang

igor.js igorjs

🦝
Building Raccoon Lang
View GitHub Profile
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
@igorjs
igorjs / btc-e.js
Created January 10, 2021 08:26 — forked from carlos8f/btc-e.js
btc-e trading api
/**
* BTC-e JavaScript Trading API
* https://btc-e.com/api/documentation
*
* Author: jsCoin
* BTC : 151vumzopVBZMV9CtswFiumQBbEHcULPnG
* LTC : Laoq3qsLvQFCnnbfcFGpQyjy5kcK58bpen
*
* Dependencies:
* jQuery - http://jquery.com/
@igorjs
igorjs / Satoshi_Nakamoto.asc
Created January 10, 2021 08:10 — forked from carlos8f/Satoshi_Nakamoto.asc
Satoshi Nakamoto's PGP key
-----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
@igorjs
igorjs / simple-promise-retry.js
Created January 8, 2021 05:28 — forked from briancavalier/simple-promise-retry.js
A few general patterns for retries using promises
function keepTrying(otherArgs, promise) {
promise = promise||new Promise();
// try doing the important thing
if(success) {
promise.resolve(result);
} else {
setTimeout(function() {
keepTrying(otherArgs, promise);
@igorjs
igorjs / toggleAutoScalingGroup.md
Created December 10, 2020 23:39 — forked from veuncent/toggleAutoScalingGroup.md
AWS Auto Scaling Groups: scheduled start/stop

Tutorial: scheduled start/stop of EC2 instances managed by Auto Scaling Groups

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.

Create new Lambda function and Start Event

@igorjs
igorjs / README.md
Created November 25, 2020 06:50 — forked from sidorares/README.md
node.js conventions and best practices

Node.JS best practices and conventions

This is not about JS style

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)

// scraped from https://mariadb.com/kb/en/mariadb/documentation/sql-language-structure/mariadb-error-codes/
//
module.exports = [
[
"1000",
"HY000",
"ER_HASHCHK",
"hashchk"
],
[
@igorjs
igorjs / _readme.md
Created October 12, 2020 23:52 — forked from andywer/_readme.md
React - Functional error boundaries

React - Functional error boundaries

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.

Proposed solution

What I Wish I'd Known About Equity Before Joining A Unicorn

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