Skip to content

Instantly share code, notes, and snippets.

View derozic's full-sized avatar
🎯

Scott de Rozic derozic

🎯
View GitHub Profile
@derozic
derozic / gist:344988448f82d3b64389d8b2b2d463b6
Created March 2, 2018 18:38
Solved! Node-gyp error on windows when you have python 2.7 and Visuall C++ build environment
npm config set python python2.7
npm install --global --production windows-build-tools
@derozic
derozic / gist:3aa893040023c3b34c7625972e7d65b9
Created March 3, 2018 18:49
Windows Command Line: Get your L3 CacheSize
wmic cpu get L2CacheSize, L3CacheSize
shasum -a 256 [path to filename]
@derozic
derozic / gist:859312bd2e3c59495e67ddcf66e7cf61
Last active March 7, 2018 18:18
Get the latest hash from your latest github.com commit
git log -n1 --format="%h"
@derozic
derozic / gist:e04535515baf2d9c7189c213b7592b29
Last active March 17, 2018 05:57
PowerShell: checksum linux equivalent on mac is shasum -a 256 filename.ext
Get-FileHash path\filename.ext
// Define two dates to compare to get to the number of days
// This example is the number of days a woman has to work
// before then making the same pay as a man in the US https://www.pay-equity.org/day.html
var date1 = '2018-04-10';
var date2 = '2018-01-01';
// First we split the values to arrays date1[0] is the year, [1] the month and [2] the day
date1 = date1.split('-');
date2 = date2.split('-');
@derozic
derozic / Get-NetIPAddress
Created April 3, 2018 23:40
PowerShell: Get IP Address
Get-NetIPAddress
@derozic
derozic / gist:2adbf797fec8abf8d9e2a157ebb94cae
Created April 6, 2018 16:37
Windows: Diskpart to format external USB and make bootable
SOP for a bootable USB key is:
Launch DiskPart as an Administrator.
Use List Disk to find your USB key
Use Select Disk to choose your USB key.
Clean (to wipe out the USB and delete the partition entries).
Run Create Partition Primary to create a new primary partition on the USB flash drive.
Format FS=NTFS Quick to lay down the file system as NTFS.
Assign (to give our USB a drive letter).
Active to make it bootable.
@derozic
derozic / gist:5095a0256e386486e13c0e4b476c8273
Created April 14, 2018 20:54
Specify specific version ranges in npm i --save to add more than one webpack to your project, for example
npm i --save webpack@">=1.4.0 <=2.7.7"
@derozic
derozic / gist:dc86fbc6fa3c40487bc2d43f80c53659
Created May 1, 2018 05:09
Generate crypted passwords on linux, for things like ansible
mkpasswd --method=sha-512