Skip to content

Instantly share code, notes, and snippets.

View ShadowKyogre's full-sized avatar

ShadowKyogre

View GitHub Profile
@ShadowKyogre
ShadowKyogre / gist:3006776
Created June 27, 2012 20:52 — forked from knu/gist:111055
How to mass-rename tags and push them with Git
# Rename tags named foo-bar-#.#.# to v#.#.# and push the tag changes
git tag -l | while read t; do n="v${t##*-}"; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done
@ShadowKyogre
ShadowKyogre / openastro_portability.patch
Created June 30, 2012 21:58
Improved portability for openastro
diff -aur openastro.org_1.1.25.orig/openastro.py openastro.org_1.1.25.modified/openastro.py
--- openastro.org_1.1.25.orig/openastro.py 2011-09-28 00:17:43 -0700
+++ openastro.org_1.1.25.modified/openastro.py 2012-06-30 14:54:31 -0700
@@ -19,7 +19,7 @@
#basics
import math, sys, os.path, datetime, socket, gettext, codecs, webbrowser
-
+import tempfile
#copyfile
@ShadowKyogre
ShadowKyogre / volumes_cc.py
Last active December 10, 2015 00:28
An attempt at modifying the default volumes plugin for kupfer to allow it to be more modular (as in only using gio for the unmount checks, which the unmount command actually handles the unmount).
__kupfer_name__ = _("Volumes and Disks (Custom Unmount)")
__kupfer_sources__ = ("VolumesSource", )
__description__ = _("Mounted volumes and disks")
__version__ = ""
__author__ = "Ulrik Sverdrup <ulrik.sverdrup@gmail.com>, Sapphira Armageddos <shadowkyogre.public@gmail.com>"
import gio
from kupfer.objects import Action, Source, FileLeaf
from kupfer.obj.fileactions import Open, OpenTerminal
@ShadowKyogre
ShadowKyogre / inspector-only-black-text.css
Last active January 5, 2018 05:22
A userContent.css file for Firefox that fixes sites that don't cooperate well with dark color schemes. So far, not all the cases are covered. Added a fix for the css inspector in firefox so it would use saner colors.
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
.ruleview {
color: black;
}
@ShadowKyogre
ShadowKyogre / lunifybg-wpd
Last active December 10, 2015 13:08
wallpaperd version of lunifybg by Xyne: https://bbs.archlinux.org/viewtopic.php?id=155540
#!/bin/sh
if [[ -d "$XDG_CACHE_HOME" ]]
then
mkdir -p "$XDG_CACHE_HOME"
fi
cd -- "$XDG_CACHE_HOME"
# Use a subdirectory to save images of the moon. It's interesting to cycle
# through them with feh to see it move.
@ShadowKyogre
ShadowKyogre / getpython.sh
Created January 7, 2013 07:06
Bored, so I wrote this possibly pointless script. Basically, it takes input arguments like this: getpython.sh 3 0 3
#!/bin/sh
for i in $(seq "$2" "$3")
do
which "python${1}.${i}" && exit 0
done
which "python${1}" || echo "$PYTHONBIN"
@ShadowKyogre
ShadowKyogre / add_text_and_page_bg_config.patch
Last active December 10, 2015 21:58
Since the colors white for the bg and black for the text are hard coded, I decided to switch around some things in order to make thos colors configurable.
diff -aur openastro.org-1.1.38.orig/openastro openastro.org-1.1.38/openastro
--- openastro.org-1.1.38.orig/openastro 2013-01-09 16:45:06.459729587 -0800
+++ openastro.org-1.1.38/openastro 2013-01-09 17:50:34.637738525 -0800
@@ -49,7 +49,10 @@
VERSION='1.1.38'
#directories
-DATADIR=os.path.join(sys.prefix,'share','openastro.org')
+if LOCAL:
+ DATADIR=os.path.dirname(__file__)
@ShadowKyogre
ShadowKyogre / PKGBUILD
Created March 26, 2013 22:13
Updated PKGBUILD and patch to make lp work for printing
# Contributer: giacomogiorgianni@gmail.com
pkgname=pdfviewer
pkgver=0.7
pkgrel=3
pkgdesc="Lightweight Qt-only PDF viewer"
arch=('i686' 'x86_64')
url="http://opendesktop.org/content/show.php/Pdf+Viewer?content=149637"
license=('GPL')
depends=('qt4' 'poppler-qt')
@ShadowKyogre
ShadowKyogre / carousel-colors.css
Last active August 29, 2015 14:01
Experimental mobile theme. Also includes some carousel code that can be easily accessed with a thumb.
@ShadowKyogre
ShadowKyogre / bookmarksjson2xml.py
Last active August 29, 2015 14:06
Converts (firefox?) bookmark json format to a KeePassX compatible XML for importing.
import os
import json
#import uuid
from urllib.parse import urlparse
import xml.etree.ElementTree as ET
from datetime import datetime, timedelta
#http://stackoverflow.com/questions/12589952/convert-microsecond-timestamp-to-datetime-in-python
epoch = datetime(1970, 1, 1)