Skip to content

Instantly share code, notes, and snippets.

View mcdruid's full-sized avatar

Drew Webber mcdruid

View GitHub Profile
@mcdruid
mcdruid / fix_plasma6_on_kde_neon.yml
Created February 29, 2024 23:58
ansible playbook: fixes for Plasma 6 on KDE Neon
---
- hosts: all
become: yes
tasks:
- name: Missing service file for krunner
ansible.builtin.blockinfile:
path: /usr/share/dbus-1/services/org.kde.krunner.service
create: true
block: |
#!/bin/bash
# @param $1
# The Drupal 7 version.
# @param $2
# The old version constant.
# @param $3
# Whether to remove the 'development version' lines.
function insert_changelog_entry() {
# This assumes the D7 changelog location, because D8 does not maintain a
@mcdruid
mcdruid / compile_lime_vol.sh
Last active June 12, 2018 13:34
compile LiME
#!/bin/bash
# todo: https://stackoverflow.com/questions/24987542/is-there-a-link-to-github-for-downloading-a-file-in-the-latest-release-of-a-repo
lime_release="1.8"
lime_tarball="https://github.com/504ensicsLabs/LiME/archive/v${lime_release}.tar.gz"
volatility_zip="https://github.com/volatilityfoundation/volatility/archive/master.zip"
# Preflight check
if [ "$(dpkg -l | grep -w 'build-essential\|dwarfdump\| zip' | wc -l)" -lt 3 ]
then
@mcdruid
mcdruid / check_zoom_version.sh
Created April 25, 2017 14:01
Shell script to check if there's an update available for the linux zoom client.
#!/bin/bash
version_available=$(curl -s -A 'linux' https://zoom.us/download | grep 'linux-ver-text.*Version [0-9.]*' | grep -o '[0-9.]*')
version_installed=$(cat /opt/zoom/version.txt)
# example version number
#version_available='2.0.89826.1000'
echo "version_available: ${version_available}"
echo "version_installed: ${version_installed}"
@mcdruid
mcdruid / report_by_email.sh
Last active August 29, 2015 14:14
Example report-by-email script suitable for running on cron
#!/bin/bash
# space separate multiple e-mails
mail_recipients='drew.webber@acquia.com drew.webber+test@acquia.com'
mail_subject="Monthly report for $(hostname +s) on $(date +'%F')"
report_commands='df -h /mnt/gfs'
@mcdruid
mcdruid / opcache_gui_list.php
Created November 4, 2014 10:38
list of opcache GUIs
<?php
$files = array(
'opcache.php' => array(
'project' => 'https://github.com/rlerdorf/opcache-status',
'download' => 'wget --no-check-certificate https://raw.githubusercontent.com/rlerdorf/opcache-status/master/opcache.php',
),
'ocp.php' => array(
'project' => 'https://gist.github.com/ck-on/4959032',
'download' => 'wget https://gist.github.com/ck-on/4959032/raw/0b871b345fd6cfcd6d2be030c1f33d1ad6a475cb/ocp.php',
@mcdruid
mcdruid / debug_memcache.inc
Last active August 29, 2015 14:03
simple Drupal cache backend to add debugging for memcache (based on how much data is being stored)
<?php
class DebugMemCacheDrupal extends MemCacheDrupal {
function set($cid, $data, $expire = CACHE_PERMANENT, array $headers = NULL) {
$created = time();
// Create new cache object.
$cache = new stdClass;
$cache->cid = $cid;
$cache->data = is_object($data) ? clone $data : $data;