Skip to content

Instantly share code, notes, and snippets.

View hardyoyo's full-sized avatar
🕺
husslin'

Hardy Pottinger hardyoyo

🕺
husslin'
View GitHub Profile
# Bash function to have Docker-Compose send a notification upon completion, because it can take a while
# "cheers" -> https://bigsoundbank.com/sound-0237-shouts-and-applauses-of-teens-2.html
# only works on a Mac, you'd have to revise it for other operating systems
docker-compose() {
local cmd="docker-compose $@"
command $cmd && osascript -e 'display notification "$cmd" with title "Docker-Compose Done" sound name "cheers"'
}
#!/usr/bin/env python3
import feedparser
import requests
import re
def monitor_jenkins_rss(rss_url):
try:
response = requests.get(rss_url)
response.raise_for_status()
@hardyoyo
hardyoyo / TastyAle.txt
Last active July 7, 2021 00:09
Hardy's Tasty Ale, almost a Kölsch
Vol: 5 Gals
Style: Not quite a Kölsch
Malts:
6 Lbs Northwestern LME, Gold
1 Lb Cara-pils, American
1 Lb Vienna, American
Hop Schedule:
.5 oz Chinook (12%) 60 minutes
@IanColdwater
IanColdwater / twittermute.txt
Last active November 17, 2024 02:37
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@escowles
escowles / disk-clear.sh
Last active October 24, 2018 12:34
fedora-wiper
#!/bin/sh
for i in /var/lib/tomcat7/fcrepo4-data/fedora.binary.directory/*; do
echo $i
rm -rf $i
done
rm -rf /var/lib/tomcat7/fcrepo4-data/[cf]*
@mcguffin
mcguffin / git-release.py
Last active October 30, 2024 17:44
Python script to create GitHub release
#!/usr/bin/env python3
import argparse, glob, json, re, subprocess, urllib.request, os, sys
class version_number:
major=0
minor=0
release=0
@desaster
desaster / foo.sh
Last active July 24, 2023 16:34
How to run tomcat as non-root with docker
#
# How to run tomcat as non-root with docker
#
# We want to map the tomact process to host user, which is created here
sudo useradd -r docker-tomcat
# start a container, but don't run tomcat yet
docker run -it -d --name=tomcat-intermediate -u $(id docker-tomcat -u) tomcat:8.0 /bin/sh
@alanorth
alanorth / fix-metadata-values.py
Last active November 6, 2018 06:58
Search and replace "bad" metadata values in the DSpace database. Reads from CSV.
#!/usr/bin/env python
# fix-metadata-values.py 1.0.0
#
# Copyright 2018 Alan Orth.
#
# 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 3 of the License, or
# (at your option) any later version.
@ninabreznik
ninabreznik / gist:9f3799df31e66b9010b6403309dce687
Last active October 24, 2017 16:37
RAILS Cheat Sheet (BACKUP)
RAILS Cheat Sheet!
########################################
Rails Tutorial/Chapter 1
RUN A LOCAL SERVER
$ rails server
CHECK VERSION OF RUBY
$ ruby -v
#!/bin/sh
#
# Author: Ivan Masar, 2015
# License: public domain
#
# list running VMs by name
# for each VM print selected fields from vminfo
# format it into a table (using "column")
print_header=1