Skip to content

Instantly share code, notes, and snippets.

Kang-min Liu gugod

Block or report user

Report or block gugod

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 hohser-domains.json
[{"domainName":"baidu.com","display":"FULL_HIDE"},{"domainName":"zhihu.com","display":"FULL_HIDE"},{"domainName":"baike.so.com","display":"FULL_HIDE"},{"domainName":"movie.douban.com","display":"FULL_HIDE"},{"domainName":"www.iqiyi.com","display":"FULL_HIDE"},{"domainName":"www.qqevd.com","display":"FULL_HIDE"},{"domainName":"www.xbsee.com","display":"FULL_HIDE"},{"domainName":"www.k8jdwang.com","display":"FULL_HIDE"},{"domainName":"www.jsr9.com","display":"FULL_HIDE"},{"domainName":"www.2xigua.com","display":"FULL_HIDE"},{"domainName":"www.hukanyy.com","display":"FULL_HIDE"},{"domainName":"www.kantiantang.net","display":"FULL_HIDE"},{"domainName":"kknews.cc","display":"FULL_HIDE"}]
View gen.pl
use v5.18;
use warnings;
my @chars = ('a'..'z');
sub genword {
return join('', @chars[map { rand(@chars) } 1..(rand(8) + 4)]);
}
my $len = 10000000;
while($len-- > 0) {
@gugod
gugod / prime-bases.txt
Created Oct 30, 2019
Programming languages and their bases.
View prime-bases.txt
# prime-bases Ada PHP Lisp awk Java Javascript Erlang Forth Brainfuck Go Kotlin C Perl Python Raku REXX Rust Smalltalk SQL Tcl Verilog XML XSLT HTML
Ada is a prime number under bases: 17, 33
PHP is a prime number under bases: 28, 36
Lisp is a prime number under bases: 34, 36
Python is a prime number under base 36
REXX is a prime number under base 35
XML is a prime number under base 34
XSLT is a prime number under base 36
HTML is a prime number under base 31
View feeds-ncl.txt
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=90001619
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=79000679
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=89032166
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=88037316
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=68700111
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=93001474
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=87300234
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=79005160
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=83300001
http://readopac3.ncl.edu.tw/nclJournal/rss_xml.jsp?classId=84300231
View pairwise_eq.pl
#!/usr/bin/perl
use v5.18;
use List::MoreUtils qw<firstidx>;
sub pairwise_eq(\@\@) {
my ($a1, $a2) = @_;
return @$a1 == @$a2 && (-1 == firstidx { $a1->[$_] ne $a2->[$_] } 0..$#$a1);
}
View org.org
View news-sites-domains-csv.txt
0media.tw, ltn.com.tw, asahichinese-f.com, citytimes.tw, cn.wsj.com, cnews.com.tw, data.gov.tw, e-info.org.tw, focustaiwan.tw, gazette.nat.gov.tw, healthmedia.com.tw, hk.crntt.com, law.moj.gov.tw, mol.mcu.edu.tw, msntw.com, musou.tw, n.yam.com, newcongress.tw, newnet.tw, news.cnyes.com, news.cts.com.tw, news.ebc.net.tw, news.knowing.asia,news.mingpao.com, news.now.com, news.pchome.com.tw, news.pts.org.tw, news.rti.org.tw, news.sina.com.tw, news.tnn.tw, news.tvb.com, news.tvbs.com.tw, newtalk.tw, nexttv.com.tw, pacific-times.com, panmedia.asia, pingtungtimes.com.tw,pnn.pts.org.tw,taiwanenews.com,taronews.tw, technews.tw, tfc-taiwan.org.tw, theinitium.com, thestandnews.com, times.hinet.net, tnntoday.com, today.line.me, tpctax.gov.taipei, trad.cn.rfi.fr, tw.aboluowang.com, tw.appledaily.com, tw.on.cc, twlugang.com, twreporter.org, udn.com, vita.tw, 101newsmedia.com, 5ch.com.tw, aborigine.tw, agriharvest.tw, allnews.tw, bbc.com, bcc.com.tw, bookmedia.com.tw, cctv.com, cdns.com.tw, cet-taiwan.org, chinapost.com.tw
@gugod
gugod / niven.pl
Last active May 9, 2019
perl-weekly-challenge-007
View niven.pl
use v5.28;
sub sum {
my $s = 0;
$s += $_ for @_;
return $s;
}
sub digits {
return split //, $_[0];
View bench-listassign.pl
use strict;
use Dumbbench;
my $bench = Dumbbench->new( inital_runs => 1000 );
my $nums = [ map { int rand(100000000) } 1...1000 ];
$bench->add_instances(
Dumbbench::Instance::PerlSub->new(
You can’t perform that action at this time.