Skip to content

Instantly share code, notes, and snippets.

@Igglybuff
Igglybuff / xig.js
Created July 30, 2015 16:52
obligatory xigglyxuff generator in js
var xiglist = [ "w", "j", "p", "g", "l", "n", "m", "b", "z", "r", "t" ];
var c1 = xiglist[Math.floor(Math.random() * xiglist.length)];
var c2 = xiglist[Math.floor(Math.random() * xiglist.length)];
while (c1 == c2) {
c1 = xiglist[Math.floor(Math.random() * xiglist.length)];
}
var xig = c1 + " i g g l y " + c2 + " u f f";
@Igglybuff
Igglybuff / disk.sh
Created July 30, 2015 16:50
a few i3blocks scripts
#!/bin/sh
# check how much free disk space remains on primary drive
kbs=$(df -k /tmp | tail -1 | awk '{print $4}')
echo "$(( $kbs / 1024 / 1024 ))GB"
@Igglybuff
Igglybuff / imgscrot.py
Last active August 29, 2015 14:17
imgscrot.py
import base65
import json
import requests
import sys
import os
from base64 import b64encode
# cheeky little script which uploads an image to imgur.com then prints the direct link to the image
# add your imgur api key to your environment variables, or just throw it straight into the code.
@Igglybuff
Igglybuff / urlpinch.pl
Created March 14, 2015 20:35
url-shortener
#!/usr/bin/perl -w
use strict;
use WWW::Shorten 'TinyURL';
my %DATA = (
name => 'urlpinch',
author => 'Igglybuff',
version => '0.0.1-alpha',
license => 'GPL3',
@Igglybuff
Igglybuff / yt-search.py
Created March 14, 2015 20:33
youtube-search
#!/usr/bin/python3
import urllib.request
import urllib.parse
import re
import sys
inargs = sys.argv
inargs.remove(inargs[0])
inargs = ' '.join(inargs)