Skip to content

Instantly share code, notes, and snippets.

View NanoAi's full-sized avatar
🏠
Working from home

NanoAi NanoAi

🏠
Working from home
View GitHub Profile
@NanoAi
NanoAi / screencap.sh
Created June 7, 2015 20:12
Script for screencapture and auto send to server, on Mac OSX Yosemite.
SITE="http://i.mirai.red";
DIR=~/Screenshots/;
[email protected];
FLDR=/home/i.mirai.red;
NM=$(LC_CTYPE=C tr -dc "a-zA-Z0-9" < /dev/urandom | head -c 5).png;
FILE=$(screencapture -i $DIR$NM && echo $DIR$(ls -Art $DIR | tail -n 1));
if [ -a $FILE ] ; then
@NanoAi
NanoAi / NodeJS-Installer.sh
Last active August 29, 2015 14:15
Shell script for installing NodeJS
echo "Hello, we will now install NodeJS & NPM."
read -p "Would you like to remove an old install first? (Y/n) " -n 1 -r && echo ""
if [[ $REPLY =~ ^[Yy]$ || ! $REPLY ]]
then
sudo apt-get remove nodejs
sudo apt-get remove npm
sudo apt-get autoremove
echo ""
fi