This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# unheader.py - Portable commandline SNES ROM unheading tool | |
# By oldmanoftheSEA (omotss@twitter, omots@github) | |
# THIS UTILITY COMES WITH NO WARRANTY EXPRESSED OR IMPLIED | |
# Backups are ALWAYS a good idea. | |
# Principles & support: | |
# This tool is generally conservative when it comes to making modifications. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/osascript | |
tell application "System Events" | |
tell process "NotificationCenter" | |
set vWindowCount to (count windows) | |
if vWindowCount is 0 then | |
return | |
end if | |
set vWindow to window 1 | |
set vNotificationContainer to (UI element 1 of scroll area 1 of vWindow) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
function highlight(span) { | |
const dataAnnotationContent = decodeURIComponent(span.getAttribute("data-annotation")) | |
const dataAnnotation = JSON.parse(dataAnnotationContent) | |
const citationItem = dataAnnotation.citationItem | |
const uri = dataAnnotation.uri | |
const id = uri.split("/").pop() | |
const text = dataAnnotation.text | |
const position = dataAnnotation.position | |
const pageIndex = position.pageIndex + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Directory Local Variables | |
;;; For more information see (info "(emacs) Directory Variables") | |
((markdown-mode . ((visual-fill-column-width . 100) | |
(mode . visual-fill-column) | |
(mode . visual-line) | |
(markdown-hide-markup . nil) | |
(markdown-header-scaling . t) | |
(markdown-wiki-link-search-parent-directories . t) | |
(markdown-wiki-link-search-subdirectories . t) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
container="" | |
bindings=$(docker inspect ${container} | jq -r '.[].HostConfig.Binds[]') | |
echo ${bindings} | while read bind; do | |
volume=${bind/:*/} | |
mount_point=${bind/*:/} | |
echo "docker run --volumes-from ${CONTAINER} -it --rm -v $(pwd)/backups:/backups busybox tar -czvf /backups/${volume}.tar.gz \"${mount_point}\"" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JOHNNY_ROOT="..." | |
function jfind() { | |
(cd "${JOHNNY_ROOT}"; find [1234567890][1234567890]* $@) | |
} | |
function jls() { | |
(cd "${JOHNNY_ROOT}"; ls -1d [1234567890][1234567890]-*/[1234567890][1234567890]\ */[1234567890][1234567890].[1234567890][1234567890]*) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import json | |
import os | |
import subprocess | |
import sys | |
def ls(wd): | |
"""Returns a list of directories under ``wd`` that match the johnny.decimal | |
pattern. The directories returned will be related to the passed working directory.""" | |
pattern = "[1234567890][1234567890]-*/[1234567890][1234567890]\ */[1234567890][1234567890].[1234567890][1234567890]*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Localized versions of Info.plist keys */ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface NSArray (Globbing) | |
+ (NSArray*) arrayWithFilesMatchingPattern: (NSString*) pattern inDirectory: (NSString*) directory; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NSOutlineView-DMExtensions.h | |
// Library | |
// | |
// Created by William Shipley on 3/10/06. | |
// Copyright 2006 Delicious Monster Software, LLC. Some rights reserved, | |
// see Creative Commons license on wilshipley.com | |
#import <Cocoa/Cocoa.h> | |
@interface NSOutlineView (DMExtensions) |
NewerOlder