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
| [alias] | |
| ; "git find" should work exactly like your system find (BSD or GNU), except for | |
| ; two things: one, it will always ignore the current git directory; and two, if | |
| ; you don't supply any root paths to search, it defaults to searching from your | |
| ; git project toplevel. | |
| ; | |
| ; paul cannon <[email protected]> 2011 | |
| find = "!_() { \ | |
| declare -a preargs; \ |
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
| # works on Mac OS X and Linux. haven't tried BSD. obviously windows is out. | |
| import os | |
| import subprocess | |
| import signal | |
| def get_tty_fg(): | |
| # make a new process group within the same session as the parent. we | |
| # do this so that if the user hits ctrl-c, etc in the curses program | |
| # that's about to be exec'd, the SIGINT and friends won't be sent to |
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
| # SaferScanner is just like re.Scanner, but it neuters any grouping in the lexicon | |
| # regular expressions and throws an error on group references, named groups, or | |
| # regex in-pattern flags. Any of those can break correct operation of Scanner. | |
| import re | |
| from sre_constants import BRANCH, SUBPATTERN, GROUPREF, GROUPREF_IGNORE, GROUPREF_EXISTS | |
| class SaferScanner(re.Scanner): | |
| def __init__(self, lexicon, flags=0): | |
| self.lexicon = lexicon |
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
| ==> Downloading http://nmap.org/dist/nmap-5.51.tar.bz2 | |
| File already downloaded in /Users/paul/Library/Caches/Homebrew | |
| /usr/bin/tar xf /Users/paul/Library/Caches/Homebrew/nmap-5.51.tar.bz2 | |
| ==> ./configure --prefix=/usr/local/Cellar/nmap/5.51 --without-zenmap | |
| ./configure --prefix=/usr/local/Cellar/nmap/5.51 --without-zenmap | |
| checking whether NLS is requested... yes | |
| checking build system type... x86_64-apple-darwin11.2.0 | |
| checking host system type... x86_64-apple-darwin11.2.0 | |
| checking for gcc... /usr/bin/llvm-gcc | |
| checking whether the C compiler works... yes |
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
| ==> Downloading http://nmap.org/dist/nmap-5.51.tar.bz2 | |
| File already downloaded in /Users/paul/Library/Caches/Homebrew | |
| /usr/bin/tar xf /Users/paul/Library/Caches/Homebrew/nmap-5.51.tar.bz2 | |
| ==> ./configure --prefix=/usr/local/Cellar/nmap/5.51 --without-zenmap | |
| ./configure --prefix=/usr/local/Cellar/nmap/5.51 --without-zenmap | |
| checking whether NLS is requested... yes | |
| checking build system type... x86_64-apple-darwin11.2.0 | |
| checking host system type... x86_64-apple-darwin11.2.0 | |
| checking for gcc... /usr/bin/gcc-4.2 | |
| checking whether the C compiler works... yes |
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/Library/Formula/nmap.rb b/Library/Formula/nmap.rb | |
| index 8bd1df1..7e06901 100644 | |
| --- a/Library/Formula/nmap.rb | |
| +++ b/Library/Formula/nmap.rb | |
| @@ -14,7 +14,7 @@ class Nmap < Formula | |
| def install | |
| ENV.deparallelize | |
| - args = ["--prefix=#{prefix}", "--without-zenmap"] | |
| + args = ["--prefix=#{prefix}", "--without-zenmap", "--without-liblua", "CFLAGS=-DNOLUA"] |
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 collections | |
| import Queue | |
| class MaxSizeDict(collections.MutableMapping): | |
| def __init__(self, maxsize): | |
| self.maxsize = maxsize | |
| self.valdict = {} | |
| self.keyqueue = Queue.Queue() | |
| def __setitem__(self, key, value): |
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
| def solve_knapsack(items, maxcost, cost=lambda n:n, value=None): | |
| """ | |
| Generic dynamic-programming knapsack problem solver. Takes time | |
| O(len(items) * maxcost), so it can be helpful to reduce the costs | |
| and maxcost by the greatest common divisor if possible. Costs for | |
| all items must be nonnegative integers. | |
| Returns the set of items the sum of whose costs does not exceed | |
| maxcost, and the sum of whose values is otherwise maximal. | |
| """ |
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
| This file contains any messages produced by compilers while | |
| running configure, to aid debugging if configure makes a mistake. | |
| It was created by quvi configure 0.2.19, which was | |
| generated by GNU Autoconf 2.68. Invocation command line was | |
| $ ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/quvi/0.2.19 --enable-nsfw --enable-todo --enable-nlfy | |
| ## --------- ## | |
| ## Platform. ## |
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/git-pbuilder 2012-09-28 12:18:15.000000000 -0600 | |
| +++ /usr/bin/fixed-git-pbuilder 2012-11-08 21:07:37.123999784 -0700 | |
| @@ -1,4 +1,4 @@ | |
| -#!/bin/sh | |
| +#!/bin/bash | |
| # $Id: git-pbuilder,v 1.27 2012/01/13 04:12:35 eagle Exp $ | |
| # | |
| # git-pbuilder -- Wrapper around pbuilder for git-buildpackage | |
| @@ -75,7 +75,8 @@ | |
| fi |