Skip to content

Instantly share code, notes, and snippets.

View Belrestro's full-sized avatar
🇺🇦

Andrew Vorobiov Belrestro

🇺🇦
  • Kiev
View GitHub Profile
@Arp-G
Arp-G / multipart_s3_upload.js
Created June 18, 2022 08:38
Multipart upload to S3
import fs from 'fs';
import { Buffer } from 'node:buffer';
import {
S3Client,
CreateMultipartUploadCommand,
UploadPartCommand,
CompleteMultipartUploadCommand
} from '@aws-sdk/client-s3';
// 100 MB chunk/part size
@cowboy
cowboy / mock-axios.js
Last active July 3, 2024 19:38
axios mocking via interceptors
import axios from 'axios'
let mockingEnabled = false
const mocks = {}
export function addMock(url, data) {
mocks[url] = data
}
@jan-swiecki
jan-swiecki / docker-machine-install-docker-compose.sh
Created March 11, 2016 12:48
Installs docker-compose inside docker-machine
#!/bin/sh
# Installs docker-compose inside docker-machine
DOCKER_COMPOSE_VERSION=1.6.0
# Download docker-compose to the permanent storage
echo 'Downloading docker-compose to the permanent VM storage...'
sudo mkdir -p /var/lib/boot2docker/bin
sudo curl -sL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /var/lib/boot2docker/bin/docker-compose
@bobspace
bobspace / css_colors.js
Last active June 24, 2024 13:46
All of the CSS Color names in a big javascript object.
// CSS Color Names
// Compiled by @bobspace.
//
// A javascript object containing all of the color names listed in the CSS Spec.
// This used to be a big array, but the hex values are useful too, so now it's an object.
// If you need the names as an array use Object.keys, but you already knew that!
//
// The full list can be found here: https://www.w3schools.com/cssref/css_colors.asp
// Use it as you please, 'cuz you can't, like, own a color, man.