Skip to content

Instantly share code, notes, and snippets.

View daniel-barrows's full-sized avatar

Daniel Barrows daniel-barrows

View GitHub Profile
@daniel-barrows
daniel-barrows / Piwik upgrade errors.txt
Created January 18, 2017 20:23
Piwik upgrade errors
This is what is shown in text.
File integrity
File integrity check failed and reported some errors. You should fix this issue and then refresh this page until it shows no error.
Directories were found in your Piwik but we didn't expect them.<br/>--> Please delete these directories to prevent errors. <--<br/><br/>Directory to delete: libs/bower_components/jScrollPane/issues<br/>Directory to delete: libs/bower_components/jScrollPane/themes<br/>Directory to delete: libs/bower_components/jquery/src<br/>Directory to delete: vendor/doctrine/annotations<br/>Directory to delete: vendor/doctrine/lexer<br/>Directory to delete: vendor/mnapoli<br/><br/><br/>To delete all these directories at once, you can run this command:<br/>rm -Rf /home/harrcnoq/public_html/piwik/libs/bower_components/jScrollPane/issues /home/harrcnoq/public_html/piwik/libs/bower_components/jScrollPane/themes /home/harrcnoq/public_html/piwik/libs/bower_components/jquery/src /home/harrcnoq/public_html/piwik/vendor/doctrine/annotations /home/harrcnoq/p
@daniel-barrows
daniel-barrows / Piwik Upgrade Error.html
Last active January 18, 2017 20:29
Piwik Upgrade Error (HTML)
<!DOCTYPE html>
<html id="ng-app" ng-app="piwikApp">
<head>
<meta charset="utf-8">
<title>Piwik &rsaquo; Update</title>
...
<div class="content" style="text-align:left;">
@daniel-barrows
daniel-barrows / theme-gtk-app.bash
Created July 20, 2017 00:17
Theme a single GTK application
#!/bin/bash
# Licence: zlib/libpng
# Year:: 2017
# Status:: beta
# Description:: Change the theme of a specific application
EXIT_PREREQ_UNAVAILABLE=80
# This doesn't use actual bash arrays, but rather strings separated by arbitrary
# characters. For actual arrays, use https://stackoverflow.com/a/8574392/5389585
@daniel-barrows
daniel-barrows / startupcli
Last active September 14, 2017 12:05
A simple bash script tool to edit startup applications on Linux.
#!/bin/bash
# License:: GPLv3+
# Copyright:: 2017 Daniel Barrows
# Status:: beta
### CONSTANTS
[ -z $COLUMNS ] && COLUMNS="$(tput cols 2>/dev/null || echo 80)"
EXIT_HELP_MESSAGE=0
EXIT_FILE_NOT_FOUND=2
@daniel-barrows
daniel-barrows / neted
Created September 14, 2017 12:13
Edit network (eg. WiFi) information used by network-manager and merge from a cached copy.
#!/bin/bash
# License:: GPLv3+
# Copyright:: 2017 Daniel Barrows
# Status:: beta
#
# This currently doesn't do any sanity checks on arguments.
#
# The most powerful function here is neted merge, which basically lets you
# compare and merge your local networks with some cached networks using meld,
# and then saves the changes, while handling all the necessary file and network
@daniel-barrows
daniel-barrows / mailman-subscribers.py
Last active November 27, 2017 14:02
Scrape mailman web pages to list subscribers. Mirror of http://fog.ccsf.edu/~msapiro/scripts/mailman-subscribers.py
#!/usr/bin/env python
# vi: set et sw=4 st=4:
#
# 2004-08-27 Jim Tittsler <jwt@starship.python.net>
# 2004-10-03 jwt change authentication
# 2004-10-04 jwt remove dependency on ClientCookie
# 2004-10-07 jwt use getopt to retrieve host, list, password from command
# 2004-10-10 jwt return to using ClientCookie
# 2004-10-13 jwt add --fullnames option
# 2005-02-15 jwt switch on RFC2965 cookie support when newer version
@daniel-barrows
daniel-barrows / .block
Last active December 1, 2017 23:04 — forked from ChrisManess/.block
Criminal Procedures
license: gpl-3.0
@daniel-barrows
daniel-barrows / speedcrunch-color-update.sh
Last active September 23, 2018 16:16
Download the latest SpeedCrunch color schemes and install them for the current user. Workaround for an Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/speedcrunch/+bug/1729575
#!/bin/bash
# Name:: speedcrunch-color-update.sh
# Copyright:: 2018 Daniel Barrows
# Licence:: zlib/libpng
# Status:: beta
mv_args="$@"
branch_url=https://bitbucket.org/heldercorreia/speedcrunch.git
tmpdir="$( mktemp --directory speedcrunch-color-update-XXX )"
@daniel-barrows
daniel-barrows / gtk-icon-path.py
Last active September 24, 2018 15:05
Output the filepath(s) of any GTK icon names provided as arguments.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# https://gist.github.com/daniel-barrows/3a42d6ac96559534a7a52172083730c2
__copyright__ = "2018 Daniel Barrows"
__license__ = "Public Domain"
__status__ = "production"
import sys
import gi
gi.require_version('Gtk', '3.0')
@daniel-barrows
daniel-barrows / ubygems-workaround.sh
Last active October 22, 2018 19:37
Workaround for ubygems.rb / -rubygems parameter feature abruptly removed from Ruby. See https://bugs.ruby-lang.org/issues/14322
#!/bin/sh
# Copyright:: 2018 Daniel Barrows
# License:: zlib/libpng
# https://gist.github.com/daniel-barrows/ca8359b76ad9bb84b37593a9f7b695fc
#
# Workaround for feature abruptly removed from Ruby.
# See https://bugs.ruby-lang.org/issues/14322
# Leave warn variable empty to not output the deprecation warning.
warn=true