Skip to content

Instantly share code, notes, and snippets.

View HarlemSquirrel's full-sized avatar

Kevin McCormack HarlemSquirrel

View GitHub Profile
@HarlemSquirrel
HarlemSquirrel / hydrapaper.desktop
Last active April 14, 2021 20:22
HydraPaper desktop menu entry for GNOME and flatpak
[Desktop Entry]
# Place this file in ~/.local/share/applications/
Name=hydrapaper
GenericName=HydraPaper
Comment=A Gtk utility to set two different backgrounds for each monitor on GNOME
Exec=flatpak run org.gabmus.hydrapaper
Terminal=false
Type=Application
StartupNotify=true
# https://github.com/GabMus/HydraPaper/raw/master/data/icons/org.gabmus.hydrapaper.svg
@HarlemSquirrel
HarlemSquirrel / build_nitrogen_ubuntu_1604.sh
Last active May 15, 2018 02:10
Build Nitrogen on Ubuntu 16.04
# Building Nitrogen on Ubuntu 16.04
# https://github.com/l3ib/nitrogen
# Install dependencies
sudo apt-get install autoconf autopoint libgtk2.0-dev libgtkmm-2.4-dev libglib2.0-dev
# Download
cd ~/Downloads
wget https://github.com/l3ib/nitrogen/releases/download/1.6.1/nitrogen-1.6.1.tar.gz
@HarlemSquirrel
HarlemSquirrel / pulseaudio-dlna.service
Last active December 9, 2024 02:43
a pulseaudio-dlna Unit file for systemd
## Systemd user unit file for pulseaudio-dlna
# Copy to: ~/.config/systemd/user/pulseaudio-dlna.service
# Enable: systemctl --user enable pulseaudio-dlna
[Unit]
Description=PulseAudio-DLNA Service
[Install]
WantedBy=default.target
@HarlemSquirrel
HarlemSquirrel / site_status.sh
Created February 15, 2018 20:29
Montior the status and duration of a endpoint with a GET request
#!/bin/bash
GREEN='\033[0;32m'
RED='\033[0;31m'
NC='\033[0m' # No Color
if [ $# -eq 0 ]; then
printf "Usage:\n"
printf " $0 http://example.com [interval]\n"
exit 1
@HarlemSquirrel
HarlemSquirrel / bundler.rb
Created November 27, 2017 15:41
Warbler 2.0.4 and Bundler 1.16.0 missing bundler.gemspec hack for lib/warbler/traits/bundler.rb
#--
# Copyright (c) 2010-2012 Engine Yard, Inc.
# Copyright (c) 2007-2009 Sun Microsystems, Inc.
# This source code is available under the MIT license.
# See the file LICENSE.txt for details.
#++
module Warbler
module Traits
# The Bundler trait uses Bundler to determine gem dependencies to
@HarlemSquirrel
HarlemSquirrel / gist:112821bdf3fe2b9d6446867329daf4b4
Created November 20, 2017 19:11
rvm_jruby-9.1.14.0_secure_random_sample.txt
Flat profile of 0.25 secs (25 total ticks): SeedGenerator Thread
Thread-local ticks:
100.0% 25 Blocked (of total)
Flat profile of 0.25 secs (23 total ticks): SeedGenerator Thread
Thread-local ticks:
@HarlemSquirrel
HarlemSquirrel / ubuntu_unattended_upgrades_gmail.markdown
Created November 4, 2017 17:24 — forked from roydq/ubuntu_unattended_upgrades_gmail.markdown
Unattended upgrades on Ubuntu 14.04 with email notifications

Getting Started

Do yourself a favor and login as root to save yourself some time and headaches:

$ sudo su -

Install unattended-upgrades:

@HarlemSquirrel
HarlemSquirrel / gnome_shell_3.26_core_dump.txt
Created October 18, 2017 22:28
gnome-shell dumped core
Process 1673 (gnome-shell) of user 1000 dumped core.
Stack trace of thread 1673:
#0 0x00007fcf271efa0d g_type_check_instance_cast (libgobject-2.0.so.0)
#1 0x00007fcf24ed3960 st_label_set_text (libst-1.0.so)
#2 0x00007fcf218071c8 ffi_call_unix64 (libffi.so.6)
#3 0x00007fcf21806c2a ffi_call (libffi.so.6)
#4 0x00007fcf25e98cbb n/a (libgjs.so.0)
#5 0x00007fcf25e9a617 n/a (libgjs.so.0)
#6 0x00007fcf1f4d264d n/a (libmozjs-52.so.0)
➤ phoronix-test-suite debug-benchmark pts/build-linux-kernel
Phoronix Test Suite v7.4.0
To Install: pts/build-linux-kernel-1.8.0
Determining File Requirements ......................................................................................................
Searching Download Caches ..........................................................................................................
1 Test To Install
@HarlemSquirrel
HarlemSquirrel / jruby-haml-lint-hang-dump-2017-08-17.txt
Created August 17, 2017 16:51
JRuby 9.1.8.0 vs 9.1.9.0 haml-lint
➤ wc app/views/layouts/_flash_messages.html.haml
8 23 266 app/views/layouts/_flash_messages.html.haml
➤ ruby -v && JRUBY_OPTS='--dev --profile' haml-lint app/views/layouts/_flash_messages.html.haml
jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab OpenJDK 64-Bit Server VM 25.131-b11 on 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11 +jit [linux-x86_64]
Profiling enabled; ^C shutdown will now dump profile info
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.3-compliant syntax, but you are running 2.3.1.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.