Skip to content

Instantly share code, notes, and snippets.

View mflanneryii's full-sized avatar

Michael Flannery II mflanneryii

View GitHub Profile
#!/bin/bash
#
# Derived from -
# Joshua Davis
# http://shrubbery.mynetgear.net/c/display/W/Java+Daemon+Startup+Script
#
# This is a modification of the original script (which lets you run a java program as a deamon.
# look bellow for more information) that lets you run a groovy script as a deamon.
#
# ============== OLD SCRIPT TEXT ==============
@BashedCrab
BashedCrab / Hydrogen.py
Last active March 19, 2023 04:14
Hydrogen - A lightweight GUI framework for Pythonista
#
# Hydrogen is a lightweight GUI framework for Pythonista
#
# Hydrogen - https://gist.github.com/BashedCrab/5924965
#
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019
#
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776
#
@BashedCrab
BashedCrab / HydrogenDemo.py
Last active March 19, 2023 04:14
Demo of the Hydrogen GUI framework for Pythonista
#
# Hydrogen is a lightweight GUI framework for Pythonista
#
# Hydrogen - https://gist.github.com/BashedCrab/5924965
#
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019
#
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776
#
@BashedCrab
BashedCrab / HydrogenLayouts.py
Last active March 19, 2023 04:14
HydrogenLayouts
#
# Hydrogen is a lightweight GUI framework for Pythonista
#
# Hydrogen - https://gist.github.com/BashedCrab/5924965
#
# HydrogenLayouts - https://gist.github.com/BashedCrab/6103019
#
# HydrogenDemo - https://gist.github.com/BashedCrab/5953776
#
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@yoav-steinberg
yoav-steinberg / rediff.py
Created April 13, 2014 15:48
rediff - the redis diff script
import urlparse
import argparse
import redis
import sys
from multiprocessing import Pool
import signal
def parse_redis_url(s):
url = urlparse.urlparse(s)
if not url.scheme:
@adamcrews
adamcrews / certificate_synthetic.js
Created June 11, 2019 05:36
New Relic SSL/TLS Synthetic
/*
To use this synthetic, set the following Secure credentials:
NEW_RELIC_INSIGHTS_API_KEY - Your api key from the account settings.
NEW_RELIC_ACCOUNT_ID - Your account ID, also found in the account settings.
CERTS_TO_MONITOR - A list of hosts to check via https, separated by a comma and a space, for example:
host.example.com, foo.example.com
Create a new Synthetic monitor, copy the entire contents of this script to the monitor.
Set the monitor to run once a day from a single location.
@zleight1
zleight1 / azp-custom-schema.yml
Last active July 1, 2021 22:03
AZP VS Code Extension Custom Schema With Template Syntax
This file has been truncated, but you can view the full file.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://github.com/Microsoft/azure-pipelines-vscode/blob/master/local-schema.json",
"$comment": "v1.147.0",
"title": "Pipeline schema",
"description": "A pipeline definition",
"oneOf": [{
"$ref": "#/definitions/pipeline"
}, {
"type": "string",
@kakarukeys
kakarukeys / .bash_profile
Last active December 4, 2021 00:50
shell script to enable Poetry .env loading
function poetry() {
dot_env_path=$(pwd)
while [[ "$dot_env_path" != "" && ! -e "$dot_env_path/.env" ]]; do
dot_env_path=${dot_env_path%/*}
done
# if POETRY_DONT_LOAD_ENV is *not* set, then load .env if it exists
if [[ -z "$POETRY_DONT_LOAD_ENV" && -f "$dot_env_path/.env" ]]; then
>&2 echo 'Loading .env environment variables…'