Skip to content

Instantly share code, notes, and snippets.

View KittyKatt's full-sized avatar

Katie KittyKatt

View GitHub Profile
@jasongraham
jasongraham / markdownize_cgit.py
Created January 9, 2011 23:55
Used by the cgit 'about-filter' to parse a markdown file.
#!/usr/bin/env python
#
# Copyright 2011, Jason Graham
#
# Uses python-markdown to convert a markdown document to the body
# of an HTML document to display with cgit (http://hjemli.net/git/cgit/).
#
# Install:
#
# 1- Install python-markdown ( sudo apt-get install python-markdown )
@iwek
iwek / lastfm-api.php
Last active January 30, 2023 21:00
Last FM API script in PHP to pull album and artist artwork.
<?php
//get artist photo
function getArtistPhoto($artist, $size) {
$artist = urlencode($artist);
$xml = "http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist={$artist}&api_key=YOUR_KEY";
$xml = @file_get_contents($xml);
if(!$xml) {
@HarHar
HarHar / gist:5439833
Last active December 16, 2015 13:09
Nick Sniper
#/usr/bin/env python
import socket, random, threading, re
from time import sleep
#Configs
network = 'IRC.SERVER.NET'
port = 6667
groups = [{'nicks': [], 'password': ''}, {'nicks': [], 'password': ''}]
interval = 60 #interval in seconds between each nick change
@HarHar
HarHar / masshighlight.py
Created May 31, 2013 03:40
Mass highlighting script for Weechat
import weechat
from time import sleep
# -*- coding: utf8 -*-
weechat.register("masshighlight", "HarHar", "1.0", "GPL3", "fgt", "", "")
hook = weechat.hook_command('mhilight', 'Mass Highlight', "", "", "msg", "mh", "")
weechat.prnt("", "Mass highlighting lock and loaded")
def mh(data, buffer, args):
buffer = weechat.current_buffer()
@KittyKatt
KittyKatt / scrotshooter
Last active December 18, 2015 17:29
screenshot taking and uploading tool
#!/usr/bin/env bash
# scrotshooter - screenshot taking and upload tool
# requires: curl, scrot
mydir="$HOME/Pictures/Screenshots"
shotfile=$(echo "screenshot-`date +'%Y-%m-%d_%H-%M-%S'`.png")
fileloc="$mydir/$shotfile"
while getopts ":d:" flags; do
case $flags in
@brenopolanski
brenopolanski / export-svg-inkscape.md
Created December 26, 2017 13:29
Exporting an object as svg from inkscape
  1. Select the object(s) to export
  2. Open the document properties window (Ctrl+Shift+D)
  3. Select "Resize page to drawing or selection"
  4. File > Save As Copy...
  5. Select Optimized SVG as the format if you want to use it on the web