- install homebrew
- place
autoconf.rb
into Formula folder:/usr/local/Library/Formula/
- run
brew install autoconf
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
<?php | |
/* | |
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
The following describes the mandatory requirements that must be adhered to for autoloader interoperability.
- A fully-qualified namespace and class must have the following structure
\ <Vendor Name> \ (<Namespace>)* \ <Class Name>
- Each namespace must have a top-level namespace ("Vendor Name").
- Each namespace can have as many sub-namespaces as it wishes.
- Each namespace separator is converted to a
DIRECTORY_SEPARATOR
when loading from the file system. - Each "_" character in the CLASS NAME is converted to a
DIRECTORY_SEPARATOR
. The "_" character has no special meaning in the namespace.
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
// drupal log parser w/ node.js | |
// takes a filtered syslog file | |
// run as node `drupal-syslog-parser.js LOGPATH` | |
// [install dependencies (lazy,underscore) first with `npm install ___`] | |
var lazy = require('lazy') | |
, fs = require('fs') | |
, path = require('path') | |
, _ = require('underscore'); |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
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 substitute { | |
if [ -z "$1" -o -z "$2" ]; then | |
echo "Usage: substitue FROM_STRING TO_STRING [OPTION]..." | |
echo | |
echo "Replace all occurances of FROM_STRING (a sed-compatible regular" | |
echo "expression) with TO_STRING in all files for which ack-grep matches" | |
echo "FROM_STRING." | |
echo | |
echo "Any additional options are passed directly to ack-grep (e.g.," | |
echo " --type=html would only run the substitution on html files)." |
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/perl -w | |
# | |
# splitmysqldump - split mysqldump file into per-database dump files. | |
use strict; | |
use warnings; | |
my $dbfile; | |
my $dbname = q{}; | |
my $header = q{}; | |
while (<>) { |
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
#!/bin/sh | |
# dropbox service | |
# Replace with linux users you want to run Dropbox clients for | |
DROPBOX_USERS="user1 user2" | |
DAEMON=.dropbox-dist/dropbox | |
start() { | |
echo "Starting dropbox..." | |
for dbuser in $DROPBOX_USERS; do |
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
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
OlderNewer