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 / 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 / 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 / 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 / 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 / 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