Skip to content

Instantly share code, notes, and snippets.

View kazuph's full-sized avatar

Kazuhiro Homma kazuph

View GitHub Profile
@yoheia
yoheia / perl_oneliner_example
Last active January 24, 2020 18:12
Perlワンライナー&マルチライナー集
Perl ワンライナーサンプル集
■概要
障害解析のためのログの調査、非互換対応でのソースコードの調査といった
テキスト処理で使った Perl ワンライナーのサンプル集です。
Perl ワンライナーは以下の点が良いと思います。
・Perl は Oracle Database (10g以降) に同梱されている。
 従って、Windows プラットフォームでも使える。
@ryugoo
ryugoo / iOS7Yahoo.md
Created October 7, 2013 12:40
iOS 7 エンジニア勉強会 @yahoo - 2013/10/07
  • Yahoo! 株式会社
  • 2013/10/07
  • 資料は後ほどシェア

iOS 7 でアプリ開発はどう変わる (佐野さん)

  • iOS 7 のデザイン原則
    • UI はコンテンツに従順 * Safari が分かりやすい
  • ナビゲーションバーが殆ど消える
my (@price,@day);
<STDIN> =~ /(\d+) (\d+)/;
$price[$_] = <STDIN> for (0..($1-1));
$day[$_] = <STDIN> for (0..($2-1));
@price = sort {$a <=> $b} @price;
for my $setprice (@day){
my @tmp = grep { $_ <= $setprice - $price[0] } @price;
my $check = 0;
@ChocolateMinht
ChocolateMinht / Alamofire.swift
Created January 7, 2015 02:42
Alamofire wrapped in a struct (iOS7 compatibility)
// Alamofire.swift
//
// Copyright (c) 2014 Alamofire (http://alamofire.org)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@syohex
syohex / fujiwara-aa.pl
Last active December 25, 2015 03:59
AA of fujiwara-san
#!perl
use strict;
use warnings;
use Furl;
use Imager;
use Text::AAlib qw(:all);
my $url = 'https://1.gravatar.com/avatar/ca6281fff64797dc419b78f51f25c0a5?d=https%3A%2F%2Fidenticons.github.com%2F51beaebc231c8720d18d10b0008693dc.png&s=420';
my $ua = Furl->new;
@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
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';
@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(
@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

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) = @_;