Skip to content

Instantly share code, notes, and snippets.

View SchaeStewart's full-sized avatar

Schaffer Stewart SchaeStewart

View GitHub Profile

Keybase proof

I hereby claim:

  • I am schaestewart on github.
  • I am cavesofsteel (https://keybase.io/cavesofsteel) on keybase.
  • I have a public key ASD-jgTo-6S0iBbaI4Vb1aAXJR5eKAQQsLgThY9v_j0R_Qo

To claim this, I am signing this object:

@SchaeStewart
SchaeStewart / chunkArray.js
Created September 18, 2018 12:34
A simple array chunking solution
const chunkArray = (arr, chunkSize) =>
arr.reduce((prev, current, index, array) => {
if (index % chunkSize === 0) {
prev.push(array.slice(index, chunkSize + index));
}
return prev;
}, []);
@SchaeStewart
SchaeStewart / ipmailer.sh
Last active January 4, 2017 15:22
Mails IP Address
#!/bin/bash
#Cron command Runs every 4 hours
#0 0 0/4 1/1 * ? *
ip="$(curl -s icanhazip.com/s)"
echo "$ip" | mail -s "IP Address Dogsoft.me" myemail@domain.com