Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
📷

Nixua stripedpurple

💭
📷
View GitHub Profile
@stripedpurple
stripedpurple / bulkUploadToImgur.sh
Created Nov 18, 2015
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 Dec 30, 2015
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?
*/
@stripedpurple
stripedpurple / FuniFFMPEG.user.js
Last active Dec 27, 2016
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 Jan 18, 2017
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 Mar 30, 2017
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
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
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==
View Domain.com Reg Codes
MLHFREE9_a4d3fa61d7
MLHFREE9_8a47dc9d20
MLHFREE9_eee3ca438f
MLHFREE9_2302c16cea
MLHFREE9_22847d5d67
MLHFREE9_e616c26d2a
MLHFREE9_be8b26c85c
View power.sh
#!/bin/bash
# Creating a backup of /etc/default/grub
cp /etc/default/grub /opt/bht/etc/grub.original
# reconfiguring grub to disable usb power mangement
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT=".*"/GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.autosuspend=-1"/g' /etc/default/grub
sudo update-grub
sudo reboot