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
/_build | |
*.native |
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 FindBin; | |
use lib "$FindBin::Bin/../lib/" | |
, "$FindBin::Bin/../lib/perl5"; # To make happy with plenv directory structure. | |
use Perl::Build; | |
use Getopt::Long; | |
use Pod::Usage; | |
use File::Spec; |
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
open Core.Std | |
module U = UnixLabels | |
try | |
let in_fd = U.descr_of_in_channel stdin in | |
let default = U.tcgetattr in_fd in | |
let cooked = {default with U.c_icanon = true} in | |
U.tcsetattr in_fd ~mode:U.TCSANOW cooked; | |
while true do | |
let line = input_line stdin in |
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/perl | |
use strict; | |
use warnings FATAL => qw/all/; | |
sub MY () {__PACKAGE__} | |
use DBI; | |
sub usage { | |
die <<END; | |
Usage: $0 [--do | --dbsub] DBFILE [N-RECORDS] [LEN-of-STR] |
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 Mojolicious::Lite; | |
use YATT::Lite::Embed; | |
foreach my $name ($YATT->list_public_items) { | |
get "/$name" => sub { | |
my ($self) = @_; | |
# $self->render(text => 'Hello!'); | |
$self->render(text => $YATT->render($name)); |
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
#!/bin/zsh | |
set -eu | |
progname=$0:a | |
function usage { | |
cat 1>&2 <<EOF; exit 1 | |
Usage: ${progname:t} SRCFN [N-copies] | |
EOF | |
} |
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
#include <sys/types.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/* | |
# Originally found at: https://access.redhat.com/articles/1200223 | |
https://access.redhat.com/sites/default/files/attachments/bash_ld_preload.c | |
# This version checks '()' just after first occurrence of '=', so that it will not do overkill. |
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
--- ghc-doc-index.orig 2014-09-25 19:47:00.000000000 +0900 | |
+++ ghc-doc-index 2014-09-25 19:47:28.000000000 +0900 | |
@@ -34,5 +34,5 @@ | |
fi | |
if [ -f $PKGDIRCACHE.new ]; then | |
- mv -f $PKGDIRCACHE{.new,} | |
+ mv -f $PKGDIRCACHE.new $PKGDIRCACHE | |
fi |
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
#!/bin/zsh | |
# Rewrite of http://www.atmarkit.co.jp/ait/articles/1208/17/news110_2.html | |
# unset summary; | |
typeset -A summary; | |
while read prod amt; do | |
((summary[$prod]+=$amt)) | |
done | |
for prod in ${(ko)summary}; do |
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
! | |
! Xmodmap for JP106 -> US | |
! | |
remove Lock = Eisu_toggle | |
add Control = Eisu_toggle | |
keysym Eisu_toggle = Control_L | |
! add mod1 = Muhenkan | |
! keysym Muhenkan = Alt_L |