Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
📷

Nixua stripedpurple

💭
📷
View GitHub Profile
@stripedpurple
stripedpurple / bulkUploadToImgur.sh
Created November 18, 2015 06:42
Add this function to your .bash_profile to upload all the images in a directory to imgur.com
View bulkUploadToImgur.sh
function uploadImage {
ext=$1
if [ "$ext" == "help" ]; then
printf "Description:\n\tUploads all images in directory of extension type specified to imgur.com\nExample:\n\tuploadImage jpg\nFile Types:\n\tPEG, PNG, GIF, APNG, TIFF, BMP, PDF, XCF (GIMP). Please note that TIFF, BMP, PDF and XCF (GIMP) will be converted to PNG on upload. PNGs over 756KB are automatically converted to JPG.\n\n\tImgur does not currently support WEBM, MP4, or GIFV uploads. They will need to be converted before upload.\n"
else
for f in *".$1";
do
printf "$f\t"
@stripedpurple
stripedpurple / rasp-mosquitto.sh
Created December 30, 2015 15:25
Installs MQTT broker (Mosquitto) on raspberry pi
View rasp-mosquitto.sh
#!/bin/sh
# Check to see if the script was run as Root
if [[ "$EUID" -ne 0 ]]; then
echo "Sorry, you need to run this as root"
exit 1
fi
cd /etc/apt/sources.list.d/
debVer=`lsb_release -a | grep -i codename | awk '{print $2}'`
if [ '$debVer' == 'jessie' ]; then
View Recursive Puzzle.js
/*
Consider this puzzle
------------------------------------------------------------
- Start from the number 1
- Repeatedly, either adding 5 or multiplying by 3, an infinite amount of new numbers can be produced.
- How would you write a function that, given a number, tries to find a sequence of such additions and multiplications that produce that number?
- For example, the number 13 could be reached by first multiplying by 3 and then adding 5 twice
- Can number 15 be reached?
*/
View O'Reilly Free Books
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf
@stripedpurple
stripedpurple / FuniFFMPEG.user.js
Last active December 27, 2016 14:43
Small bit of JS for funimation
View FuniFFMPEG.user.js
// ==UserScript==
// @name FUNI FFMPEG
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://www.funimation.com/shows/*/videos/official/*
// @grant none
// ==/UserScript==
@stripedpurple
stripedpurple / ubuntu_build_atom.sh
Created January 18, 2017 03:14
I made this so I could just wget atom to a bunch of boxes
View ubuntu_build_atom.sh
#!/bin/bash
sudo apt-get install build-essential git libgnome-keyring-dev fakeroot rpm libx11-dev libxkbfile-dev
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 80 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --config gcc # choose gcc-5 from the list
@stripedpurple
stripedpurple / usercreate.sh
Last active March 30, 2017 22:43
create multiple users at once on Ubuntu
View usercreate.sh
#!/bin/bash
# Batch creates users
# Tested on Ubuntu Server 16.04
# author: Austin Barrett
# thanks to Surendra Anne | http://www.linuxnix.com/create-multiple-users-linux/
if [[ -z $1 ]]; then
echo -e "Script Usage:\n\t./$(basename $0) user1 user2 user3... userN"
exit 1
@stripedpurple
stripedpurple / window.dimensions.user.js
Last active January 18, 2019 02:31
Simple User script that gives the dimensions of the current window.
View window.dimensions.user.js
// ==UserScript==
// @name Window Dimensions
// @namespace http://stripedpurple.io
// @version 2.0
// @description adds a dimension list to screen
// @author Austin Barrett
// @match *://localhost/*
// @grant none
// ==/UserScript==
View keybase.md

Keybase proof

I hereby claim:

  • I am viruscmd on github.
  • I am stripedpurple (https://keybase.io/stripedpurple) on keybase.
  • I have a public key ASBqocHcQwoCayCyP4-vJh7S17SJ47xz8Bxc5ROy8W1iHAo

To claim this, I am signing this object:

@stripedpurple
stripedpurple / trello-label-revealer.user.js
Created May 12, 2017 20:05
Reveals the text associated with labels on trello cards
View trello-label-revealer.user.js
// ==UserScript==
// @name Trello Label Revealer
// @namespace http://stripedpurple.io
// @version 0.1
// @description makes trello labels visible
// @author Austin Barrett
// @match *trello.com/*
// @grant none
// ==/UserScript==