This file contains hidden or 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/python | |
| target = "/Applications/Spotify.app/Contents/MacOS/Spotify" | |
| with open(target) as infile: | |
| bytes = infile.read() | |
| with open("./Spotify", "wb") as backup: | |
| backup.write(bytes) | |
| fixed = bytes.replace("VACUUM;", "xxxxxx;") | |
| with open (target, "wb") as outfile: | |
| outfile.write(fixed) |
This file contains hidden or 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
| #!/bin/sh | |
| OUTFILE="$HOME/Dropbox/org/notes-$(date '+%Y%m%d').txt" | |
| cat >> "$OUTFILE" |
This file contains hidden or 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
| (defun gnus-user-format-function-t (dummy) | |
| (case (car gnus-tmp-method) | |
| (nnimap | |
| (let ((count (nnimap-request-message-count gnus-tmp-qualified-group))) | |
| (if count | |
| (format "%d" count) | |
| "?"))) | |
| (t | |
| gnus-tmp-number-total))) |
This file contains hidden or 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
| ((python-mode | |
| (python-shell-interpreter-args . "/PATH/TO/PROJECT/manage.py shell") | |
| (python-shell-virtualenv-path . "/PATH/TO/VIRTUALENV"))) |
This file contains hidden or 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
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| Version: GnuPG v2 | |
| mQINBFc2KHoBEACogEJho6tXrJdzBOzx/jkcUXfvVEEeubdk1qtCxpezJAxea1HE | |
| Ces3rgQE5DcCeBPtaYJnf/iqAOiqKN7aLbbsnYJYaWwPqKwn5O8jge4y6nofcQ6j | |
| TLADHXxu3znZ0NXLy3Pqm0aZ8Y3IQ8MMwQAl/68NKjAWxd1p2HK5TBSwlpVONEYh | |
| aqTN3cwRfzJsC4OKOM+L0Op47s13Xlb3gxWoiMzDnvOdVukc0FkrqH5NruMOufsT | |
| owUJ9r54xVBvTY3CHyfhTfIkMNOnhxqGJdGOMO9E5cWpo4jsIPGNqgLv5VRZtSTX | |
| Ign7aT0e+DOeC5ybQDpomocGzmztfnPXuNJ1CtFt2G53zKkqej367XmZic7UMXUU | |
| HaGmINpO7hbM8gEH0cya4antWExZ3cvjCTEbuAUaxr7VdJGbWboiVlNqu6Q//8hg |
This file contains hidden or 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
| (setq user-full-name "Roth Michaels" | |
| user-mail-address "roth@rothmichaels.us") | |
| (setq my-email-addresses '("roth@rothmichaels.us" | |
| "roth@wasabihut.com" | |
| "roth@myble.net" | |
| "roth@sohoko.io")) | |
| (setq message-alternative-emails (regexp-opt my-email-addresses)) |
This file contains hidden or 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 UIKit | |
| /// Protocol to be implemented by table view cell identifier enums | |
| protocol TableViewCellIdentifier { | |
| var identifierString: String { get } | |
| } | |
| /// Extension to provide default impementation for RawRepresentable String enums | |
| extension TableViewCellIdentifier where Self: RawRepresentable, Self.RawValue == String { | |
| var identifierString: String { |
This file contains hidden or 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
| (setq sh-basic-offset 2 sh-indentation 2) | |
| (setq sh-indent-for-case-label 0) | |
| (setq sh-indent-for-case-alt '+) |
This file contains hidden or 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
| // Photoshop Script to Create iPhone Icons from iTunesArtwork | |
| // | |
| // WARNING!!! In the rare case that there are name collisions, this script will | |
| // overwrite (delete perminently) files in the same folder in which the selected | |
| // iTunesArtwork file is located. Therefore, to be safe, before running the | |
| // script, it's best to make sure the selected iTuensArtwork file is the only | |
| // file in its containing folder. | |
| // | |
| // Copyright (c) 2010 Matt Di Pasquale | |
| // Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com |
This file contains hidden or 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
| func magicValue<T>() -> T? { | |
| let type = T.self | |
| switch type { | |
| case _ where type == String.self: | |
| return "hello, world" as? T | |
| case _ where type == Int.self: | |
| // Ask for a number and get the answer to life, the universe, and everything | |
| return 42 as? T | |
| default: | |
| return nil |
NewerOlder