Skip to content

Instantly share code, notes, and snippets.

View bayashi's full-sized avatar
💎
OK

bayashi bayashi

💎
OK
View GitHub Profile
@bayashi
bayashi / irir-config-gotest.yaml
Last active December 31, 2023 00:45
irir-config-gotest.yaml
---
gotest:
- type: prefix
match: "--- PASS"
color: green
target: line
- type: prefix
match: "ok"
color: green
target: line
@bayashi
bayashi / go-tmpl.patch
Last active December 8, 2023 23:19
go-tmpl.patch for Module::Setup flavor
diff --git a/additional/config.yaml b/additional/config.yaml
new file mode 100644
index 0000000..2fbf0ff
--- /dev/null
+++ b/additional/config.yaml
@@ -0,0 +1 @@
+--- {}
diff --git a/config.yaml b/config.yaml
new file mode 100644
index 0000000..3777dd0
@bayashi
bayashi / DeepL_ja-en.js
Last active September 27, 2021 22:39
DeepL JA-EN bookmarklet
javascript:(function(){Q=''+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);if(!Q)Q=prompt("Text?","");A=Q.match(/^[a-zA-Z\-\=\"\!\&\.\,\'\s]+$/)?'en/ja/':'ja/en/';if(Q)open('https://www.deepl.com/translator#'+A+encodeURIComponent(Q),'_blank');})()
@bayashi
bayashi / the_20039_words_which_could_be_com_domain.txt
Created March 23, 2020 15:57
The 20039 words which could be .com domain
aaronical
abactinal
abandonedly
abaptiston
abarognosis
abbassid
abdicable
abdominocyesis
abdominocystic
abdominogenital
@bayashi
bayashi / the_words_which_could_be_com_domain.txt
Created March 21, 2020 09:26
The words which could be .com domain
aboriginalise
acanthaster
accusatival
accusatorial
aciculate
acidophilic
aconitine
acusector
acoustoelectronics
acoustooptics
@bayashi
bayashi / mylog
Created May 2, 2019 20:51
Invoke this from .bashrc for daily log
#!/usr/bin/env perl
use strict;
use warnings;
my $SUBLIME = '/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl';
my $BASE_PATH = '/path/to/physical_file';
my $SHORTCUT = '/path/to/Desktop/mylog.md';
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
$year += 1900;
@bayashi
bayashi / userChrome.css
Created December 31, 2018 23:14
firefox userChrome.css
/* For Mac: ~/Library/Application Support/Firefox/Profiles/FOOBAR.default/chrome/userChrome.css */
/* hide tab bar */
#TabsToolbar { visibility: collapse !important; }
/* hide header of side bar */
#sidebar-header { visibility: collapse; }
/* multiple bookmark toolbar */
#personal-bookmarks {
display: block;
@bayashi
bayashi / gist:9e57147e49c0c6e595cbb39cb56c538e
Created February 2, 2018 12:41
vertical explain table for DBIx::QueryLog
return sub {
my %args = @_;
return $sth->fetchall_arrayref(+{}) unless defined $args{print} and $args{print};
my $t = Text::ASCIITable->new();
$t->setCols('explain', 'result');
$t->alignCol({explain => 'right', result => 'left'});
my @cols = @{$sth->{NAME}};
for my $records (@{$sth->fetchall_arrayref}) {
@bayashi
bayashi / test_slide.md
Created March 18, 2016 11:03
test slide

test だよ


ほげ

ふが

hoge

@bayashi
bayashi / gist:5dbee33e65d5c7e58fa6
Created August 21, 2015 06:29
YAPC::Asia 2015 Busy Rate
$ perl -MLWP::Simple=get -we 'my %r=(a=>1000, b=>100, c=>120, d=>288, e=>288); for my $room (sort keys %r){ my ($count) = (get("http://api.conbu.net/v1/associations/track_$room") =~ m!:(\d+)!); printf("track".uc($room).": %.2f%%\t%04d/%04d\n", $count/$r{$room}*100, $count, $r{$room}); }'
trackA: 44.60% 0446/1000
trackB: 136.00% 0136/0100
trackC: 66.67% 0080/0120
trackD: 75.35% 0217/0288
trackE: 68.40% 0197/0288