Skip to content

Instantly share code, notes, and snippets.

View README.md

WOKE

Keep windows alive

Installing

Copy the files from this gist into a folder and run

woke.bat
@jdelibas
jdelibas / config.yaml
Last active Sep 22, 2019
~/.verdaccio/conf/config.yaml
View config.yaml
# PLACE THIS FILE IN ~/.verdaccio/conf/config.yaml
#
# This is the config file used for the docker images.
# It allows all users to do anything, so don't use it on production systems.
#
# Do not configure host and port under `listen` in this file
# as it will be ignored when using docker.
# see https://verdaccio.org/docs/en/docker#docker-and-custom-port-configuration
@jdelibas
jdelibas / README.md
Last active May 28, 2019
local-npm-cache
View README.md

Local npm cache installer

Local npm registry that caches all calls to npm.

Comes with a built in UI, once its finished syncing you should see the results.

https://github.com/local-npm/local-npm

Install

@jdelibas
jdelibas / cloudSettings
Last active Nov 25, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-11-25T12:04:54.687Z","extensionVersion":"v3.4.3"}
@jdelibas
jdelibas / create-psd.js
Created May 30, 2018
Create psd (nodejs - imagemagick)
View create-psd.js
const path = require('path');
const fs = require('fs');
const { exec } = require('child_process');
let command = 'convert ';
const images = fs.readdirSync(path.resolve(__dirname, 'images')).filter(i => i.includes('jpg') || i.includes('jpeg')).map(i=> `images/${i}`)
command += images.map(i => {
const label = i.split('/')[1]
return `\\( -page +0+0 -label "${label}" ${i} -background none -mosaic -set colorspace RGB \\) `
@jdelibas
jdelibas / merge.js
Last active Mar 7, 2018
merge object array via discriminator - append only
View merge.js
function merge(dest, src, discriminator) {
if (!discriminator) {
return [...dest, ...src];
}
const result = [...dest];
src.forEach((s) => {
const match = dest.find(d => d[discriminator] === s[discriminator]);
if (match) {
const oldVal = JSON.stringify(match);
const newVal = JSON.stringify(s);
@jdelibas
jdelibas / README.md
Last active Apr 17, 2018
Useful git commands
View README.md

Useful git commands

Config

Alias

alias.pretty=log --pretty=oneline
alias.tag-graph=log --tags --graph --oneline --decorate --simplify-by-decoration
alias.co=checkout -b
@jdelibas
jdelibas / remove.sh
Created Aug 17, 2017
remove node_modules recursive
View remove.sh
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@jdelibas
jdelibas / README.md
Last active Jun 7, 2017
AWS KMS and S3 secret storage
View README.md

AWS KMS and S3 secret storage

Usage

const Secrets = require('./Secrets')
const secrets = new Secrets({
  accessKeyId: 'some aws access key id',
  secretAccessKey: 'some aws secret access key'
You can’t perform that action at this time.