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
| # Prompt | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
| } | |
| export PS1="\[\033[31;38m\]\u@\h\[\033[00m\]:\[\033[31;38m\]\w\[\033[1;31m\]\$(parse_git_branch)\[\033[00m\] " | |
| # Editor | |
| export GIT_EDITOR='nano -Y patch' |
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
| ;;; | |
| ;;; Recursively list files in a given directory | |
| ;;; | |
| ;;; Author: daniel m german dmg at uvic dot ca | |
| ;;; Copyright: daniel m german | |
| ;;; License: Same as Emacs | |
| ;;; | |
| (defun directory-files-recursive (directory match maxdepth ignore) | |
| "List files in DIRECTORY and in its sub-directories. | |
| Return files that match the regular expression MATCH but ignore |
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
| # Source: https://gist.github.com/4702275 | |
| # | |
| # All-purpose gist tool for Pythonista. | |
| # | |
| # When run directly, this script sets up four other scripts that call various | |
| # functions within this file. Each of these sub-scripts are meant for use as | |
| # action menu items. They are: | |
| # | |
| # Set Gist ID.py - Set the gist id that the current file should be | |
| # associated with. |
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-pep8.el --- minor mode for running `pep8' | |
| ;; Copyright (c) 2009, 2010 Ian Eure <ian.eure@gmail.com> | |
| ;; Author: Ian Eure <ian.eure@gmail.com> | |
| ;; Keywords: languages python | |
| ;; Last edit: 2010-02-12 | |
| ;; Version: 1.01 |
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
| ;;; | |
| ;;; Recursively list files in a given directory | |
| ;;; | |
| ;;; Author: daniel m german dmg at uvic dot ca | |
| ;;; Copyright: daniel m german | |
| ;;; License: Same as Emacs | |
| ;;; | |
| (defun directory-files-recursive (directory match maxdepth ignore) | |
| "List files in DIRECTORY and in its sub-directories. | |
| Return files that match the regular expression MATCH but ignore |
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 yh/orgtbl-to-rst-paddings (table) | |
| (let* ((pruned-table (remove 'hline table)) | |
| (size-table (mapcar (lambda (row) | |
| (mapcar #'length row)) | |
| pruned-table))) | |
| (apply #'mapcar* #'max size-table))) | |
| (defun yh/orgtbl-padded-hline (paddings &optional chr) | |
| (let ((chr (or chr ?-))) | |
| (concat (format "+%c" chr) |
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
| # Shell script to download Oracle JDK from command prompt / terminal. | |
| # You can download all the binaries one-shot by just giving the BASE_URL. | |
| ## Features: | |
| # Resumes a broken [previous] download, if any. | |
| # Renames the file to a proper name with platform adding platform info. | |
| # Downloads all the following from Oracle Website with one shell invocation. | |
| # a. Windows 64 and 32 bit; | |
| # b. Linux 64 and 32 bit; and | |
| # c. API Docs. |
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
| obj-m += hello-packet.o | |
| all: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules | |
| clean: | |
| make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean |
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
| diff --git a/bin/swift-get-nodes b/bin/swift-get-nodes | |
| index d52480e..00ae50a 100755 | |
| --- a/bin/swift-get-nodes | |
| +++ b/bin/swift-get-nodes | |
| @@ -52,8 +52,9 @@ if __name__ == '__main__': | |
| try: | |
| ring_path, args = parse_get_node_args(options, args) | |
| - except InfoSystemExit: | |
| - sys.exit(parser.print_help()) |
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
| diff --git a/bin/swift-get-nodes b/bin/swift-get-nodes | |
| index f2e3046..0e9eea9 100755 | |
| --- a/bin/swift-get-nodes | |
| +++ b/bin/swift-get-nodes | |
| @@ -19,7 +19,8 @@ import os | |
| from optparse import OptionParser | |
| from swift.common.ring import Ring | |
| -from swift.cli.info import print_item_locations, InfoSystemExit | |
| +from swift.cli.info import (parse_get_node_args, print_item_locations, |
OlderNewer