Skip to content

Instantly share code, notes, and snippets.

View okbel's full-sized avatar
💭
idle computing

Bel okbel

💭
idle computing
View GitHub Profile
brew install ffmpeg
brew install gifsicle
@okbel
okbel / ahre.js
Last active March 18, 2018 06:35
Sabado 3AM
// Stato - State managment - Since javascript is non-reactive
function createStore(reducer, initialState) {
var store = {};
store.state = initialState;
store.listeners = [];
function subscribe(listener) {
store.listeners.push(listener);
}
@okbel
okbel / generate-icons.sh
Created July 8, 2019 11:11
Generates icons given a PNG
#!bin/sh
# Exit the script on any command with non 0 return code
set -e
npx sharp -i ./content/images/icon.png -o ./static/icons/favicon-16x16.png resize 16
npx sharp -i ./content/images/icon.png -o ./static/icons/favicon-32x32.png resize 32
npx sharp -i ./content/images/icon.png -o ./static/icons/favicon-96x96.png resize 96
npx sharp -i ./content/images/icon.png -o ./static/icons/icon-512x512.png resize 512
npx sharp -i ./content/images/icon.png -o ./static/icons/icon-384x384.png resize 384