Skip to content

Instantly share code, notes, and snippets.

View ken39arg's full-sized avatar

Kensaku Araga ken39arg

  • KAYAC Inc.
  • Yokohama, Kamakura
View GitHub Profile
@ken39arg
ken39arg / sha256keygen.go
Created October 21, 2020 05:09
SHA256用の64byteのキー文字列を作るやつ
package main
import (
"fmt"
"math/rand"
"strings"
"time"
)
const (
package main
import (
"fmt"
"strconv"
"testing"
)
var columns = []string{"a", "b", "c", "d", "e", "f"}
use strict;
use warnings;
{
package Simple;
sub foo { 1 }
}
{
use strict;
use warnings;
use utf8;
use 5.012;
my ($path, $date) = @ARGV;
my @files = map {chomp $_; $_}split /\n/, `git ls-files $path`;
for my $file (@files) {
my $updated = `git log -n1 --format="%aI" $file`;
use strict;
use warnings;
use utf8;
use 5.012;
sub parse_email {
my $email = shift;
my $pos = rindex($email, "@");
return (substr($email, 0, $pos), substr($email, $pos + 1));
@ken39arg
ken39arg / tiers.go
Last active December 28, 2018 02:53
apple store tier 価格出すやつ
package main
import (
"encoding/json"
"flag"
"fmt"
"log"
"net/http"
"os"
"strings"
use strict;
use warnings;
use Benchmark qw(:all);
use DateTime;
my $now = DateTime->now();
my $last = $now->clone->subtract(minutes => 10);
my $now_epoch = scalar time();
printf "%s\n", $now->strftime('%Y%m%d');
@ken39arg
ken39arg / copyandlink.sh
Last active December 1, 2017 11:16
ISUCON7 MSAの最終コードと自分用メモ
package test
import "reflect"
func SliceEqualBy(slice interface{}, checkFun func(i int) bool) bool {
rv := reflect.ValueOf(slice)
for i := 0; i < rv.Len(); i++ {
if !checkFun(i) {
return false
}
package test
import "reflect"
func SliceEqualBy(slice interface{}, checkFun func(i int) bool) bool {
rv := reflect.ValueOf(slice)
for i := 0; i < rv.Len(); i++ {
if !checkFun(i) {
return false
}