Skip to content

Instantly share code, notes, and snippets.

View squizzi's full-sized avatar

Kyle Squizzato squizzi

View GitHub Profile
@squizzi
squizzi / task_inspect_capture.sh
Last active January 22, 2018 23:58
Inspect failed and running tasks of all services
## Diagnostic data capture for Docker services and their associated tasks
## Run where client bundle is loaded or on a swarm manager
## Use something like:
## docker service ps $each | grep -v 'ID' | awk '{print $1 " " $6}' | egrep -i 'failed|running' | awk '{print $1}';
## to grep out specific states within TASK_ID
## ---
# Create a directory to store this data in
DIRECTORY="$(pwd)/docker-service-info/"
mkdir -p $DIRECTORY
@squizzi
squizzi / capture-host-perf.sh
Last active June 19, 2017 19:16
Simple tool to capture performance statistics around a Docker daemon log match.
#!/bin/bash
## capture-host-performance
## Maintainer: Kyle Squizzato - [email protected]
## Simple tool to capture performance statistics around a daemon log match.
## Only supports distros using journalctl at this time.
## Fill in each of the variables in the SETUP section then invoke the script
## and wait for the issue to occur, the script will stop on it's own when
@squizzi
squizzi / halp_cant_see_sfdc_stuff.css
Last active June 22, 2017 06:27
halp can't see sfdc 'cause the fonts just are so small
/* Monospace fonts across case comments and case fields */
.caseTab .tertiaryPalette,
.individualPalette .caseBlock .tertiaryPalette,
.layoutEdit .individualPalette .caseBlock .tertiaryPalette {
background-color: #36a0fe;
border-color: #015ba7;
}
.caseTab .primaryPalette,
.individualPalette .caseBlock .primaryPalette {
background-color: #1797c0;
@squizzi
squizzi / notify_send.py
Last active January 17, 2025 14:56
Send errors through notify-send, good for use with autokey scripts
#!/usr/bin/env python
import os
from subprocess import Popen
"""
Notify users via notify-send in gnome-shell, if sending an error use is_error=True
Edit service_title with the desired title notify-send will use when sending msg
"""
def notify_msg(msg, service_title="Your service here", is_error=False):
# Determine which level we should write to

Keybase proof

I hereby claim:

  • I am squizzi on github.
  • I am squizzi (https://keybase.io/squizzi) on keybase.
  • I have a public key ASD0kS49KU_989cxxqdYwhle5rc4NEpFgcLuUsxlJiR8rAo

To claim this, I am signing this object:

@squizzi
squizzi / print_message.py
Last active March 24, 2017 18:24
A cute little message printer that doesn't need any special libraries to run
#!/usr/bin/env python
# Copyright (C) 2017, Kyle Squizzato <[email protected]>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of