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/env perl | |
use v5.12; | |
use boolean -truth; | |
use JSON; | |
sub boolean::TO_JSON() { !$_[0] ? \0 : \1 } | |
my $json = JSON->new->convert_blessed; | |
my $bools = { false => ( 0 == 1 ), true => ( 1 == 1 ) }; | |
eval { say encode_json($bools) }; |
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
<WDC WD20EARS-00MVWB0 51.0AB51> at scbus0 target 0 lun 0 (pass0,ada0) | |
<WDC WD20EARS-00MVWB0 51.0AB51> at scbus0 target 1 lun 0 (pass1,ada1) | |
<WDC WD20EARX-00PASB0 51.0AB51> at scbus0 target 2 lun 0 (pass2,ada2) | |
<WDC WD20EARX-00PASB0 51.0AB51> at scbus0 target 3 lun 0 (pass3,ada3) | |
<Port Multiplier 0325197b 000e> at scbus0 target 15 lun 0 (pass4,pmp0) | |
<WDC WD20EARX-00PASB0 51.0AB51> at scbus2 target 0 lun 0 (pass5,ada4) | |
<WDC WD20EARX-00PASB0 51.0AB51> at scbus2 target 1 lun 0 (pass6,ada5) | |
<WDC WD20EARS-00MVWB0 51.0AB51> at scbus2 target 2 lun 0 (pass7,ada6) | |
<WDC WD20EARS-00MVWB0 51.0AB51> at scbus2 target 3 lun 0 (pass8,ada7) | |
<Port Multiplier 0325197b 000e> at scbus2 target 15 lun 0 (pass9,pmp1) |
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/env node | |
/* | |
* $Id: voorhees.js,v 0.2 2013/04/03 07:11:17 dankogai Exp dankogai $ | |
* | |
* (c) 2013 Dan Kogai | |
* | |
* Licensed under the MIT license. | |
* http://www.opensource.org/licenses/mit-license | |
* | |
*/ |
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
% perl -E 'system qw[perl -E], q[say %{{"a".."z"}}] for 1..100' |
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/env perl | |
use strict; | |
use warnings; | |
use File::Spec; | |
our $VERSION = sprintf "%d.%02d", q$Revision: 0.1 $ =~ /(\d+)/g; | |
sub usage { exec 'pod2usage', $0 or die "pod2usage: $!" } | |
my $cmd = '/usr/bin/osascript'; | |
die "$0 : $cmd nonexistent" unless -x $cmd; | |
my @paths = grep { -e $_ } map { File::Spec->rel2abs($_) } @ARGV; |
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
--- bsfilter.1.0.18rc5 Sun Mar 10 03:03:03 2013 | |
+++ bsfilter Mon Jul 1 02:52:54 2013 | |
@@ -933,24 +933,27 @@ | |
if (str.force_encoding('ASCII-8BIT') =~ reg_gb18030_possible) | |
gb18030_possible = true | |
end | |
- | |
- if (str.encode('UTF-8', 'UTF-8') =~ reg_utf8) | |
- @options["message-fh"].printf("lang ja utf8\n") if (@options["debug"]) | |
- return ["ja", "utf8"] |
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
% cat /usr/ports/shells/bash/pkg-message | |
====================================================================== | |
bash requires fdescfs(5) mounted on /dev/fd and procfs(5) mounted on | |
/proc. | |
If you have not done it yet, please do the following: | |
mount -t fdescfs fdesc /dev/fd | |
mount -t procfs proc /proc |
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 Foundation | |
if C_ARGC < 2 { | |
println("\(C_ARGV[0]) url") | |
exit(-1) | |
} | |
let url = NSURL.URLWithString(String.fromCString(C_ARGV[1])) | |
var enc:NSStringEncoding = NSUTF8StringEncoding | |
var err:NSError? | |
let content = | |
NSString.stringWithContentsOfURL(url, usedEncoding:&enc, error:&err) |
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 Foundation | |
if C_ARGC < 2 { | |
println("\(C_ARGV[0]) url") | |
exit(-1) | |
} | |
let url = NSURL.URLWithString(String.fromCString(C_ARGV[1])) | |
var enc:NSStringEncoding = NSUTF8StringEncoding | |
var err:NSError? | |
let content = | |
NSString.stringWithContentsOfURL(url, usedEncoding:&enc, error:&err) |
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
// | |
// main.swift | |
// church | |
// | |
// Created by Dan Kogai on 6/15/14. | |
// Copyright (c) 2014 Dan Kogai. All rights reserved. | |
// | |
/* Operators */ |