Skip to content

Instantly share code, notes, and snippets.

Kei Kamikawa Code-Hex

Block or report user

Report or block Code-Hex

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View quine.go
/*
#!perl
#*/
package main;import("fmt");import("io/ioutil");
const(q=`/*
#!perl
#*/
package main;import("fmt");import("io/ioutil");
sub import{};
print "hello";
@Code-Hex
Code-Hex / main.dart
Created May 9, 2019
dart async sample
View main.dart
void main() async {
print(new DateTime.now());
String tm = await delayedTime();
print(tm);
}
Future<String> delayedTime() async {
Duration oneSecond = new Duration(seconds: 2);
return new Future.delayed(oneSecond, () {
return new DateTime.now().toString();
@Code-Hex
Code-Hex / oneliner.sh
Last active Feb 10, 2019
メルカリノベルティのワンライナー
View oneliner.sh
#!/bin/bash
perl -e 'BEGIN{$^H{q}=sub{$_[0]=~y.Macir.Plr\0.r};$^H|=0x8000};print.0.00.qw.Just.and.0.00.print.32.97.110.111.116.104.101.114.32.q.Mercari.and.0.00.print.32.104.97.99.107.101.114.44'
# Just another Perl hacker,
View memo.md

Pods

1個以上のコンテナを走らす事ができる

ReplicaSets

同じ pod を指定した数だけ動かす。一つがダウンすると新しい pod が立つ

Secrets

@Code-Hex
Code-Hex / validaion_test.go
Last active Aug 10, 2018
Go, inteface type validation (channel and pointer of empty struct)
View validaion_test.go
package main
import (
"reflect"
"testing"
)
type TS struct {
id int
name string
@Code-Hex
Code-Hex / sample_a.go
Last active Apr 15, 2018
Goroutine meets a signal @go Conference 2018 Spring
View sample_a.go
package main
import (
"fmt"
"os"
"os/signal"
"sync"
"syscall"
)
View slacklog
#! /usr/bin/perl
use strict;
use warnings;
use Fcntl qw(SEEK_SET);
use File::Temp qw(tempfile);
use Getopt::Long;
use Pod::Usage;
use Furl;
@Code-Hex
Code-Hex / hello_world.ll
Last active Feb 20, 2018
Compiler::CodeGenerator::LLVM で生成した WebAssembly 向けの LLVM IR とそれから生成した wast
View hello_world.ll
; ModuleID = 'LLVMIR'
source_filename = "LLVMIR"
target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
target triple = "wasm32-unknown-unknown-elf"
%union.UnionType = type { double }
%struct._Hash = type { i32, %union.UnionType*, %struct._String**, i32 }
%struct._String = type { i32, i8*, i32, i32 }
%struct._Object = type { i32, %union.UnionType, i8*, i8*, i8*, i8*, i8*, i8* }
%struct._IO_FILE = type opaque
@Code-Hex
Code-Hex / csv.pl
Last active Nov 9, 2017
Maybe easy to get csv data??
View csv.pl
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use feature qw/say/;
use Text::CSV;
my $csvfile = 'hello.csv';
my $csv = Text::CSV->new({ binary => 1 }) or die "Cannot use CSV: ".Text::CSV->error_diag();
@Code-Hex
Code-Hex / calc.p6
Created Oct 21, 2017
Perl6 で計算機
View calc.p6
#use Grammar::Debugger;
#use Grammar::Tracer;
use MONKEY-SEE-NO-EVAL;
grammar Calc::Grammar {
rule TOP { ^ <expr> $ }
rule expr { [ <term> <op> <expr> | <term> ] }
rule term { [ <group> | <number> ] }
You can’t perform that action at this time.