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 AnyEvent::Handle; | |
my $c = AE::cv; | |
my $out = AnyEvent::Handle->new(fh => \*STDOUT); | |
my $in; $in = AnyEvent::Handle->new( | |
fh => \*STDIN, | |
on_read => sub{ | |
my $hdl = shift; |
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
@echo off | |
REM VisualStudioの環境変数を設定する | |
call "c:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86 | |
REM CygwinコンソールでWindows式のファイルパスを使ったときに警告を出さない | |
set CYGWIN=nodosfilewarning | |
C: | |
chdir C:\cygwin\bin |
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
#compdef perlbrew | |
typeset -A opt_args | |
local context state line | |
_arguments -C \ | |
'(- 1 *)'{-h,--help}'[prints help]' \ | |
'(-f --force)'{-f,--force}'[Force installation of a perl]' \ | |
'(-q --quiet)'{-q,--quiet}'[Log output to a log file rather than STDOUT. This is the default.]' \ | |
'(-v --verbose)'{-v,--verbose}'[Log output to STDOUT rather than a logfile]' \ |
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
-- serialize | |
JSON::XS: 2.3 | |
Data::MessagePack: 0.34 | |
Storable: 2.30 | |
Benchmark: running json, mp, storable for at least 1 CPU seconds... | |
json: 1 wallclock secs ( 1.08 usr + 0.00 sys = 1.08 CPU) @ 12444.44/s (n=13440) | |
mp: 2 wallclock secs ( 1.07 usr + 0.00 sys = 1.07 CPU) @ 11821.50/s (n=12649) | |
storable: 1 wallclock secs ( 1.06 usr + 0.00 sys = 1.06 CPU) @ 14490.57/s (n=15360) | |
Rate mp json storable | |
mp 11821/s -- -5% -18% |
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 | |
# | |
# A simple script to reject commit when there is an unstaged changes | |
# or an untracked file. | |
# | |
# To enable this script, copy this into .git/hooks in your working dir. | |
if `git status |grep -q 'Changes not staged for commit:'` | |
then | |
echo '[!!ERROR!!] Threre is a modified but unstaged file!' |
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 strict; | |
use warnings; | |
our $VERSION = '0.01'; | |
use constant DEBUG => (!!$ENV{DEBUG}); | |
use Getopt::Std; |
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 -x | |
mkdir -p /usr/local/bin | |
cd /usr/local/bin | |
curl -L 'https://gist.githubusercontent.com/Maki-Daisuke/377eae4aaeb1110de183/raw/93a0072929084f6959565dc2516ecde34ad79f00/smbopen' > smbopen | |
chmod +x smbopen |
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 strict; | |
use Getopt::Std; | |
$Getopt::Std::STANDARD_HELP_VERSION = 1; | |
sub HELP_MESSAGE { | |
my $fh = shift; | |
print $fh <<HELP; |
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
package main | |
import "fmt" | |
import "flag" | |
import "math/rand" | |
func main() { | |
var opt_no_alpha bool | |
var opt_no_digit bool | |
var opt_no_unsco bool |
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 | |
unset DYLD_LIBRARY_PATH ; unset LD_LIBRARY_PATH | |
mkdir -p ~/.boot2docker | |
if [ ! -f ~/.boot2docker/boot2docker.iso ]; then cp /usr/local/share/boot2docker/boot2docker.iso ~/.boot2docker/ ; fi | |
/usr/local/bin/boot2docker init | |
if /usr/local/bin/boot2docker up; then | |
export DOCKER_HOST=tcp://$(/usr/local/bin/boot2docker ip 2>/dev/null):2376 | |
export DOCKER_CERT_PATH=/Users/maki/.boot2docker/certs/boot2docker-vm | |
export DOCKER_TLS_VERIFY=1 |
OlderNewer