Skip to content

Instantly share code, notes, and snippets.

View kazuph's full-sized avatar

Kazuhiro Homma kazuph

View GitHub Profile
@hayajo
hayajo / downcase.ank
Last active August 29, 2015 13:58
ankoを使ってプラグイン機構っぽいのを実装してみた
filter.Add(func(s) {
return strings.ToLower(s)
}, 10)
@ainame
ainame / AMEHTTPRequestTestCase.h
Last active August 29, 2015 14:01
非同期+HTTPリクエストをスタブしたいときに使うと便利なテストクラス
#import <XCTest/XCTest.h>
#import <TKRGuard.h>
#import <OHHTTPStubs.h>
@interface AMEHTTPRequestTestCase : XCTestCase
@property (nonatomic, strong) NSURLRequest *lastRequest;
- (void)stubAllRequestWithResponseFileName:(NSString *)responseFileName statuCode:(NSInteger)statusCode;
@mash
mash / Makefile
Last active August 29, 2015 14:06
OUT = ir-state.png ir-learn.png ir-send.png packer.png wifi-morse-setup.png
all: $(OUT)
.SUFFIXES: .png .gv .msc
.gv.png:
dot -Tpng $< -o $@
@Craftworks
Craftworks / mymemcheck
Created December 8, 2010 15:14
MySQL memory configuration check tool
#!/usr/bin/env perl
use strict;
use warnings;
my @GLOBAL_BUFFERS = qw(
key_buffer_size
innodb_buffer_pool_size
innodb_log_buffer_size
innodb_additional_mem_pool_size
@Cside
Cside / colorize.pl
Created June 14, 2012 09:54
colorize keywords of logs.
#!/usr/bin/env perl
=head1 Examples
$ tail -f access_log | perl colorize.pl
$ plackup app.psgi 2>&1 | perl colorize.pl
=cut
use strict;
package Amon2::Plugin::Model;
use strict;
use warnings;
use Module::Find;
use Try::Tiny;
our $VERSION = '0.01';
sub init {
my ($class, $context_class, $config) = @_;
@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

@ntakanashi
ntakanashi / gist:5811276
Created June 19, 2013 02:32
Get title from url.
#!/usr/bin/env perl
use common::sense;
use Furl::HTTP;
use HTML::TagParser;
$ARGV[0] =~ /(s?https?:\/\/[-_.!~*'()a-zA-Z0-9;\/?:\@&=+\$,%#]+)/ or die 'invalid format';
my $url = $1;
my $furl = Furl::HTTP->new;
my ($minor_version, $status, $message, $headers, $content) = $furl->request(
diff --git a/webapp/perl/cpanfile b/webapp/perl/cpanfile
index e3d6103..944b12e 100644
--- a/webapp/perl/cpanfile
+++ b/webapp/perl/cpanfile
@@ -2,3 +2,6 @@ requires 'Kossy' => '0.12';
requires 'DBIx::Sunny' => '0.17';
requires 'DBD::mysql' => '4.022';
requires 'Starman' => '0.3003';
+requires 'Starlet';
+requires 'Cache::Memory::Simple';
@kawanet
kawanet / NSURL+dictionaryFromQueryString.h
Last active December 23, 2015 15:49 — forked from halsk/NSURL+dictionaryFromQueryString.h
val にも = が入っていたり、key/val に + があった場合に対応してみました。 val が不正で stringByReplacingPercentEscapesUsingEncoding が例外を出す場合もあるけど未対応。
#import <Foundation/Foundation.h>
@interface NSURL (dictionaryFromQueryString)
-(NSDictionary *) dictionaryFromQueryString;
@end