Skip to content

Instantly share code, notes, and snippets.

View HakShak's full-sized avatar
🚀
Internet Spaceships

Nicholas Herring HakShak

🚀
Internet Spaceships
View GitHub Profile
@HakShak
HakShak / SimpleSentryLogrusHook.go
Last active December 12, 2020 01:57
Simple Sentry Logrus Hook
import (
"errors"
"github.com/getsentry/sentry-go"
"github.com/sirupsen/logrus"
)
var (
logrusLevelsToSentryLevels = map[logrus.Level]sentry.Level{
logrus.PanicLevel: sentry.LevelFatal,
@HakShak
HakShak / subprocessHelper.py
Last active April 30, 2016 18:09
Subprocess with stdout and stderr control
import subprocess
import logging
import threading
import Queue
import time
def queue_stream(queue, stream):
with stream:
for line in iter(stream.readline, b''):
report = line.rstrip()
@HakShak
HakShak / CustomFieldSanityCheckRepair.groovy
Last active November 23, 2015 16:42
JIRA Custom Field Cleanup/Sanity Check/Repair Script to make sure custom fields aren't slowing bulk changes down. WARNING: BREAKS ALL THE THINGS
/**
* This is broken and I am not sure why. It makes the Custom Fields admin page
* and configurations look exactly like you want them to, but screens for creating issues does terrible things.
* I'm thinking it might be the "isGlobal()" check in the inspirational material...
*
* Created by nicholas.herring@ccpgames.com on 11/20/2015.
* This script attempts to sanity check and repair the custom fields in a JIRA installation.
* Because there is a terrible evolution of custom fields, the admin interface has a bad practice flow.
* All new custom fields are added to all projects and all issues types. This is bad for large installations.
* It makes things like bulk edit to timeout when you have ~250 unrestricted custom fields.
@HakShak
HakShak / teamcity.go
Created March 10, 2015 18:24
GoLang TeamCity Test Output
package teamcity
import (
"fmt"
"runtime"
"strconv"
"time"
"testing"
)
@HakShak
HakShak / BlendColor.lua
Last active August 29, 2015 14:16
Rainmeter LUA Script for blending multiple color scales
-- BlendColor is a LUA script for processing multiple color scales to output
-- RGBA notation within Rainmeter INIs.
--Each scale is composed of "Start Percentrage, End Percentage, Start Color Value, End Color Value" notation
--e.g.: Fade a color in gradually over 100% would be "0,100,0,255"
--You can add more scales via a pipe '|' delimiter
--The below examples are the equivalent of "0,100,0,255"
--"0,50,0,128|50,100,128,255"
--"0,25,0,64|25,50,64,128|75,50,128,192|75,100,192,255"
@HakShak
HakShak / hakshak-rainmeter.ini
Created February 24, 2015 18:55
Initial Rainmeter
[Rainmeter]
Update=100
[Metadata]
Name=HakShak HWiNFO
Author=Nicholas Herring
Information=Things with stuff!
Version=1.0.0
; ------------------------------ variables ------------------------------

Keybase proof

I hereby claim:

  • I am hakshak on github.
  • I am hakshak (https://keybase.io/hakshak) on keybase.
  • I have a public key whose fingerprint is 0E7B 8AC8 B504 E323 D3BB 5C49 A596 52E0 BF3E F7CD

To claim this, I am signing this object: