Skip to content

Instantly share code, notes, and snippets.

View moznion's full-sized avatar

moznion moznion

View GitHub Profile
@Shinpeim
Shinpeim / 007.md
Last active December 15, 2015 03:29
プロセスさん第7回、シグナル と kill

重要

サイズがあまりに大きくなってしまったので、gist ではなくて github 上で管理するようにしました。

https://github.com/Shinpeim/process-book

URL 変わっちゃうの申し訳ないんだけど、一覧性が高くなるのと pull req が受け取れるメリットのほうを取ります。せっかく読みにきてくれたのにひと手間かかっちゃってすみません。

Niigata.ll 発表(?)資料 「Perl なめんな」

猫型です。Niigata.llの開催おめでとうございます。行けなくてくやしいです。資料だけここに公開します。タイトルは「Perlなめんな」です。dis られがちなオブジェクトシステムと例外機構の貧弱さについて現代的な Perl の視点から回答します。

「Perl は可読性が〜」とか 「Perl はオブジェクトシステムがぶっ壊れてる〜」とかうるせえよ CPAN なめんなって話

「素のPerlのオブジェクトシステムは貧弱すぎる」。その通りです、でも Mouse とかを使えば結構素直に書けるのです。

Mouseってなに

<?php
function nyan(){
return 1;
}
$nyan = NyAn();
var_dump($nyan); // => int(1)
@ichigotake
ichigotake / Yancha-Plugin-SalvageDarkHistory.pm
Last active December 15, 2015 20:19
[動かない] 過去の発言をランダムにサルベージするYanchaプラグイン。サーバーをforkするためか、動作が不安定になる。別の実装に切り替えないとダメ
package Yancha::Plugin::SalvageDarkHistory;
use strict;
use warnings;
sub setup {
my ($class, $sys) = @_;$sys->register_hook( 'before_send_post', sub {
my $int = int rand 100; #数字が低いほど高確率
return if $int;
my $pid = fork;
@studio3104
studio3104 / ProvisioningFrameworksCasualTalks01.md
Last active December 16, 2015 10:08
Provisioning Frameworks Casual Talks vol.1

Provisioning Frameworks Casual Talks vol.1

ChefとかPuppetとかの勉強会です
次回があるかはわかりませんが、今回はChef成分多めになっております

インターネット情報

Twitterハッシュタグ #pfcasual
IRCチャンネル #chef-casual@freenode

use strict;
use warnings;
use Test::More;
BEGIN {
use List::Util ();
no warnings 'redefine';
@makamaka
makamaka / yancha_ircd.pl
Created May 30, 2013 16:19
yanchaのircなアレの実験に使ったコード
use strict;
use warnings;
use feature 'say';
use AE;
use AnyEvent::IRC::Server;
use AnyEvent::IRC::Util;
use Getopt::Long;
use Yancha::Client;
use LWP::UserAgent;
use AnyEvent::IRC::Client;
@willurd
willurd / web-servers.md
Last active May 16, 2025 10:42
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@Shinpeim
Shinpeim / option.rb
Last active December 19, 2015 06:09
require "singleton"
class Option
def map(f)
flatmap(->(x){option(f.call(x))})
end
end
def option(value)
if value == nil
# -*- mode: sh -*-
_cpanm() {
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
opt_bool=(--verbose --quiet --interactive --force --notest --test-only --sudo --installdeps --showdeps --reinstall --mirror-only --prompt --self-contained --self-upgrade --version --dev
--with-all-features --with-develop --without-develop --pp --pureperl