Skip to content

Instantly share code, notes, and snippets.

View dryliketoast's full-sized avatar

Michael Kane dryliketoast

View GitHub Profile

How you can help reduce node_modules bloat

This recent reddit thread reveals discontent among the web development community about the sheer volume of stuff in a typical node_modules dir. 140MB in this case!

Is it a design flaw in npm?

Opinions in the thread varied from "I'm surprised npm even works" to "everything is fine". I'm not going to offer an opinion, just these two observations:

  1. node_modules dirs typically do contain lots of stuff that doesn't need to be there.
  2. The latest version mitigates overall size by flattening the dependency tree, but some of the bloat is beyond npm's control.
@bigsan
bigsan / msgconvert.pl
Created August 3, 2016 06:59
Perl: Convert outlook .msg to .eml
perl -we 'use Email::Outlook::Message; print Email::Outlook::Message->new(shift)->to_email_mime->as_string' foo.msg > bar.eml
@thelbouffi
thelbouffi / mailparse installation
Created September 25, 2016 11:05
how to instal mailparse on php7
REQUIREMENTS:
- php-pear (install automatically php7.0-xml and php-xml)
sudo apt-get install php-pear
-php7.0-mbstring
sudo apt-get install php7.0-mbstring
-php7.0-dev
sudo apt-get install php7.0-dev
INSTALLATION:
1- cd /tmp/xxxxxx (e.g: cd /tmp/pear/download)
@biinari
biinari / extract-123-reg-zonefile.js
Last active February 8, 2023 14:23
Script to extract the DNS entries from 123-reg advanced dns page
// Moved to a new home at https://github.com/biinari/zonefile-extract/tree/master/123-reg
@grisu48
grisu48 / create_vm_snapshot.sh
Last active September 23, 2020 07:56
Shell script to stop KVM, create BTRFS snapshot and restart KVM machines again
#!/bin/bash
# Shell script to stop all KVM instances, create a BTRFS snapshot (read-only) and restart the stopped KVM instances
# https://gist.github.com/grisu48/535c27cd25c096248ce234ad81abf1b9
## Configuration ##############################################################
IMGDIR="/mnt/RAID/libvirt/images"
SNAPDIR="/mnt/RAID/libvirt/snapshots"
# timeout in seconds
TIMEOUT=300