Skip to content

Instantly share code, notes, and snippets.

@gpittarelli
gpittarelli / node_prune.sh
Last active March 3, 2022 17:04
Prunes very-likely-uneeded files from node_modules directories
#!/usr/bin/env bash
# Port of https://github.com/tj/node-prune to bash
# Also,
# - fixed "*.ts" being overzealous and killing .d.ts files
# - added some more file types from https://github.com/npm/npm/issues/5264#issuecomment-259800486
#
# See also:
# - https://github.com/timoxley/cruft
# - https://yarnpkg.com/en/docs/cli/autoclean
# - https://github.com/ModClean/modclean
require 'rubygems'
require 'mechanize'
FIRST_NAME = 'FIRST_NAME'
LAST_NAME = 'LAST_NAME'
PHONE = 'PHONE'
EMAIL = '[email protected]'
PARTY_SIZE = 2
SCHEDULE_RANGE = { :start_time => '19:00', :end_time => '20:30' }
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active March 21, 2025 15:01
Backend Architectures Keywords and References
@jhartikainen
jhartikainen / gist:1046179
Created June 25, 2011 05:15
Format a numeric string every three numbers
//Is this abuse of array functions? :D
'20000001'.split('').reverse().join('').match(/\d{3}|\d+$/g).map(function(s){ return s.split('').reverse().join(''); }).reverse().join(' ');
//produces "20 000 001"