| /** | |
| * BTC-e JavaScript Trading API | |
| * https://btc-e.com/api/documentation | |
| * | |
| * Author: jsCoin | |
| * BTC : 151vumzopVBZMV9CtswFiumQBbEHcULPnG | |
| * LTC : Laoq3qsLvQFCnnbfcFGpQyjy5kcK58bpen | |
| * | |
| * Dependencies: | |
| * jQuery - http://jquery.com/ |
| 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 |
| const fs = require('fs'); | |
| const path = require('path'); | |
| let getContent = (path) => { | |
| const data = fs.readFileSync(path, 'utf8'); | |
| return JSON.parse(data); | |
| } | |
| let safeResolve = (base, target) => { | |
| const targetPath = '.' + path.posix.normalize('/' + target); |
| /** | |
| * DISCLAIMER: | |
| * This Utility is in a Work in Progress state. | |
| * The ideia is to encrypt the sensitive data in the Frontend to prevent XSS data stealing. | |
| * | |
| * @author Igor Santos <igor@igorjs.io> | |
| * | |
| * @see https://www.npmjs.com/package/crypto-js | |
| */ | |
| import CryptoJS from 'crypto-js'; |
| /** | |
| * Example: | |
| * | |
| * const multiply20 = (price) => price * 20; | |
| * const divide100 = (price) => price / 100; | |
| * const normalizePrice = (price) => price.toFixed(2); | |
| * const addPrefix = (price) => '$' + String(price); | |
| * | |
| * const getDiscount = pipe(multiply20, divide100, normalizePrice, addPrefix); | |
| * |
Not using yarn ? see the corresponding pnpm action gist
While @setup/node has a built-in cache parameter for popular package managers, it discards the cache on every lock file update. This composite action allows to run install with (almost always) warm cache. Depending on repo usage, that might reduces the monthly ci-time and decrease the carbon emissions. See also actions/setup-node#325.
Based on the nextjs-monorepo-example. A cold cache install on the ci is more than 2 minutes. With warmed cache: 1 minute. Crafted from benchmarks results in https://gist.github.com/belgattitude/0ecd26155b47e7be1be6163ecfbb0f0b. Depending on repo (renovatebot...), the slight complexity increase in ci setup might worth it.
(To be improved)
- httpie (which provides the
httpcommand) —pip install httpie
- Save the
git-branch-protection.shasgit-branch-protectionsomewhere in your path (something like~/binor~/.local/binif you already use it) - Generate a GitHub token and save it as
~/.config/github_token.
| /** | |
| * Calculate the distance between two points on Earth using the Haversine formula | |
| * @param Point1 { lat: number; lng: number } - The first point | |
| * @param Point2 { lat: number; lng: number } - The second point | |
| * @returns Distance in metres | |
| */ | |
| function calcDistanceInMetresBetweenTwoPoints(Point1, Point2) { | |
| const EARTH_RADIUS_METERS = 6371000; // Earth's radius in meters | |
| // Convert degrees to radians |
If you're using a high-end bluetooth headset on your Macbook Pro it's likely your mac is using an audio codec which favors battery efficiency over high quality. This results in a drastic degradation of sound, the SBC codec is the likely culprit, read more about it here.
