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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.disk.noatime</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>mount</string> |
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
use Time::HiRes qw(time); | |
my %routes = ( | |
"/foo/bar/baz" => 0, | |
"/foo/bar/qux" => 1, | |
"/foo/bar/quux" => 2, | |
"/foo/bar/corge" => 3, | |
"/foo/bar/grault" => 4, | |
"/foo/bar/garply" => 5, | |
"/foo/baz/bar" => 6, | |
"/foo/baz/qux" => 7, |
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
check_tree.c:34:35: warning: implicit declaration of function 'zstrdup' is invalid in C99 [-Wimplicit-function-declaration] | |
fail_if( r3_node_add_child(n, zstrdup("/add") , child) == FALSE ); | |
^ | |
/opt/local/include/check.h:271:4: note: expanded from macro 'fail_if' | |
(expr) ? \ | |
^ | |
check_tree.c:34:35: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'char *' [-Wint-conversion] | |
fail_if( r3_node_add_child(n, zstrdup("/add") , child) == FALSE ); | |
^~~~~~~~~~~~~~~ | |
/opt/local/include/check.h:271:4: note: expanded from macro 'fail_if' |
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
~/tmp/ % cd Router-R3 | |
█▓▒░c9s@c9smba█▓▒░ Fri May/23 PM 00:22:57 | |
~/tmp/Router-R3/ % git init | |
Initialized empty Git repository in /Users/c9s/tmp/Router-R3/.git/ | |
█▓▒░c9s@c9smba█▓▒░ Fri May/23 PM 00:22:58 | |
~/tmp/Router-R3/ (git:master) % git submodule init | |
█▓▒░c9s@c9smba█▓▒░ Fri May/23 PM 00:23:01 | |
~/tmp/Router-R3/ (git:master) % git submodule add https://github.com/c9s/r3.git libr3 | |
Cloning into 'libr3'... | |
remote: Reusing existing pack: 2031, 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
#!/usr/bin/env perl | |
use lib 'lib'; | |
use strict; | |
use warnings; | |
use Time::HiRes qw(time); | |
use Router::R3; | |
use Router::Boom; | |
use Router::Boom::Method; | |
use Router::Simple; | |
use HTTP::Router; |
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
Cache-Control | |
Connection | |
Date | |
Pragma | |
Trailer | |
Transfer-Encoding | |
Upgrade | |
Via | |
Warning | |
Accept |
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
ci () { | |
git status -uno | |
if [[ -n "$*" ]] | |
then | |
echo "Committing..." | |
git commit -v -a -m "$*" | |
else | |
echo "**** Please Enter Commit Message ****" | |
cat > .commit-msg | |
if [[ -e '.commit-msg' ]] |
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
{ | |
"endpoint": 0, | |
"compare": 0, | |
"edges": [ | |
{ | |
"pattern": "\/", | |
"opcode": 0, | |
"slug": false, | |
"child": { | |
"endpoint": 0, |
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
/* | |
* Request Header | |
* http://tools.ietf.org/html/rfc2616#section-5.3 | |
*/ | |
h3_request_header_get_accept(RequestHeader *header); // Get "Accept" | |
h3_request_header_get_accept_charset(RequestHeader *header); // Get "Accept-Charset" | |
h3_request_header_get_accept_language(RequestHeader *header); // Get "Accept-Language" | |
h3_request_header_get_accept_encoding(RequestHeader *header); // Get "Accept-Encoding" | |
h3_request_header_get_authorization(RequestHeader *header); // Get "Authorization" | |
h3_request_header_get_expect(RequestHeader *header); // Get "Expect" |
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 | |
function foo() { | |
try { | |
// throw new YoubikeException; | |
throw new Exception; | |
} catch (Exception $e) { | |
echo 'Caught Exception: ', get_class($e), "\n"; | |
return 1; | |
} finally { | |
echo 'Finally block'; |
OlderNewer