Skip to content

Instantly share code, notes, and snippets.

View miknight's full-sized avatar

Michael Knight miknight

View GitHub Profile
import com.atlassian.jira.ComponentManager
import com.atlassian.jira.issue.CustomFieldManager
import com.atlassian.jira.issue.MutableIssue
ComponentManager componentManager = ComponentManager.getInstance()
CustomFieldManager customFieldManager = componentManager.getCustomFieldManager()
MutableIssue issue = componentManager.getIssueManager().getIssueObject("TEST-1")
return issue.getCustomFieldValue(customFieldManager.getCustomFieldObjectByName("Epic"))
@miknight
miknight / related-posts-thumbnails.php
Created January 8, 2011 17:40
Around line 250. Added NextGen Gallery support to Related Posts Thumbnails WordPress plugin.
### Keybase proof
I hereby claim:
* I am miknight on github.
* I am miknight (https://keybase.io/miknight) on keybase.
* I have a public key whose fingerprint is 82D1 3673 B5B5 86BD 1FDD 865C F677 D857 8431 BA77
To claim this, I am signing this object:
@miknight
miknight / recover_source_code.md
Created March 15, 2017 03:26 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb