Skip to content

Instantly share code, notes, and snippets.

View malimccalla's full-sized avatar

Mali McCalla malimccalla

View GitHub Profile
@Embraser01
Embraser01 / gen-docker-config.js
Created May 12, 2020 10:56
Simple node script used to generate a k8s compatible docker `config.json`
/**
* This script will create a base64 string that will be used by K8S to pull
* images from the Docker Registry.
*
* More info here: https://kubernetes.io/fr/docs/tasks/configure-pod-container/pull-image-private-registry/
*/
const encodeToBase64 = (str) => Buffer.from(str).toString('base64');
const createFinalString = (obj) => encodeToBase64(JSON.stringify(obj));
@gagarine
gagarine / fish_install.md
Last active June 5, 2024 20:25
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

Install Fish

brew install fish

@JamieMason
JamieMason / group-objects-by-property.md
Created September 14, 2018 07:38
Group Array of JavaScript Objects by Key or Property Value

Group Array of JavaScript Objects by Key or Property Value

Implementation

const groupBy = key => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = obj[key];
    objectsByKeyValue[value] = (objectsByKeyValue[value] || []).concat(obj);
    return objectsByKeyValue;
@juhaelee
juhaelee / react-typescript.md
Last active May 28, 2024 17:41
React + Typescript Cheatsheet

React + Typescript Cheatsheet

Setup

If you use atom... download & install the following packages:

What are Typescript type definition files? (*.d.ts)

@lukehedger
lukehedger / ffmpeg-compress-mp4
Last active June 11, 2024 00:52
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@staltz
staltz / introrx.md
Last active June 15, 2024 12:24
The introduction to Reactive Programming you've been missing