Skip to content

Instantly share code, notes, and snippets.

View ytnobody's full-sized avatar
♨️
Loves Sento

Satoshi Azuma a.k.a. ytnobody ytnobody

♨️
Loves Sento
View GitHub Profile
@ytnobody
ytnobody / gittest.txt
Last active December 21, 2015 20:39
git test
azuma@ubuntu:~/myproj$ git log
commit 52b0450b049f45b88b4aa4b0694ca646f16f2f12
Author: ytnobody <[email protected]>
Date: Wed Aug 28 15:12:55 2013 +0900
Z
commit 3807c7bb1b25166078f9ca269788eafd7990aabb
Author: ytnobody <[email protected]>
Date: Wed Aug 28 15:12:38 2013 +0900
@ytnobody
ytnobody / nephia-primalize.sh
Created August 21, 2013 07:55
migration nephia to primalnephia
#!/bin/sh
PROJ_DIR=$1 ; shift
cd $PROJ_DIR
git mv lib/Nephia lib/PrimalNephia
find ./* ./.gitignore -type f | xargs sed -i 's/Nephia/PrimalNephia/g; s/nephia-setup/primalnephia-setup/g;'
git add . && minil build && minil test && git add . && git commit -m 'rename' && git push
@ytnobody
ytnobody / compare_bench.pl
Created August 15, 2013 07:28
compare engine benchmark
use strict;
use warnings;
use Benchmark qw(:all);
use Test::Deep::NoTest;
use Data::Compare;
{
package Data::Compare::Deparse;
use B::Deparse;
my $deparser = B::Deparse->new();
@ytnobody
ytnobody / hachiojipm-26.md
Created June 18, 2013 03:46
ytnobody flavored markdown2impress.pl - support image syntax
#!/usr/bin/env bash
# shellcheck disable=SC2016
#
# plenvsetup http://is.gd/plenvsetup
# Tue Jan 7 17:29:22 JST 2020 v0.06 by ytnobody
#
set -e
die () {
@ytnobody
ytnobody / rbenvsetup
Last active December 17, 2015 19:28
automated rbenv setup
#!/bin/sh
#
# rbenvsetup http://is.gd/rbenvsetup
# Tue May 28 11:03:00 JST 2013 v0.01 by ytnobody
#
RBENV_REPO=git://github.com/sstephenson/rbenv.git
RBENV_ROOT=$HOME/.rbenv
PROF_FILE=$HOME/.bash_profile
@ytnobody
ytnobody / hoge.lua
Created April 10, 2013 09:05
loadstring + if
#!/usr/bin/env lua
i = 20
f = loadstring("if (i == 20) then return true else return nil end")
if ( f() ) then
print "ok"
else
print "ng"
end
@ytnobody
ytnobody / banana.pl
Created March 14, 2013 06:21
へんなIRCBot
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use AnyEvent;
use AnyEvent::Twitter::Stream;
use AnyEvent::IRC::Client;
use Encode;
use Net::Twitter::Lite;
use Text::MeCab;
@ytnobody
ytnobody / pfm.pl
Created February 27, 2013 02:16
P::FMつかってみた
use strict;
use warnings;
use Parallel::ForkManager;
my $pm = Parallel::ForkManager->new(4);
for my $i ( 1 .. 30 ) {
my $sleep = int(rand(5)+3);
my $pid = $pm->start and next;
printf "PID:%s NUM:%s START sleep %s\n", $pid, $i, $sleep;
@ytnobody
ytnobody / to-8bit.pl
Created December 6, 2012 02:08
pngを8bitに
use strict;
use warnings;
use Imager;
my $i = Imager->new;
$i->read(file => 'meat.png');
my $img = $i->to_rgb8;
$img->write(file => 'lite-meat.png');