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 | |
# | |
# usage: find-dup <dir> [<dir>...] | |
# | |
use strict; | |
use File::Find; | |
use IO::File; | |
use Digest; | |
my $digest_method = "MD5"; |
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/ruby1.8 -Ku | |
require "iconv" | |
GETA = [0x3013].pack("U") | |
def to_geta(encoding, str, alter = GETA) | |
cd = Iconv.new(encoding, "utf8") | |
chars = [] | |
str.each_char do |char| |
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 | |
use strict; | |
use warnings; | |
use utf8; | |
use DateTime; | |
use Text::Xslate; | |
use Encode; | |
render_calendar(@ARGV); # cal_html.pl 5 2011 |
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 | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
# 入力ファイルはこんなかんじで | |
# ....... | |
# ...AA.. | |
# ..BB... | |
# ..BBC.. |
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 | |
LANG=C who -u | awk "\$1 == \"$1\" { print \$7 }" | xargs -r kill -9 |
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 | |
use strict; | |
use warnings; | |
use utf8; | |
use Time::Piece; | |
use Text::Xslate; | |
use Encode; | |
render_calendar(@ARGV); # cal_html.pl 5 2011 |
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 MyApp::PC::Admin::Member; | |
use 5.016; | |
use warnings; | |
my @RULE = ( | |
name => ['NOT_NULL'], | |
); | |
sub edit { | |
my ($class, $c) = @_; |
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; | |
my %map; # 座席表 | |
my @lines; # 順に移動する列を保持する | |
{ | |
# データ読み込み | |
while (<DATA>) { |
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 onclick() { | |
var lock = LockService.getDocumentLock(); | |
if (lock.tryLock(10)) { | |
shuffle_members(); | |
lock.releaseLock(); | |
} | |
} | |
function shuffle_members() { | |
var range = SpreadsheetApp.getActiveSheet().getRange("members"); |
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
/* | |
* @OnlyCurrentDoc | |
*/ | |
function myFunction() { | |
var names = GroupsApp.getGroups() | |
.map(function(g) { return g.getEmail().replace(/@.*/, "") }) | |
.sort(); | |
SpreadsheetApp.getActiveSheet() |
OlderNewer