Skip to content

Instantly share code, notes, and snippets.

View Songmu's full-sized avatar

Masayuki Matsuki Songmu

View GitHub Profile
@Songmu
Songmu / dd.pl
Last active December 23, 2015 22:29
use strict;
use warnings;
use Benchmark qw/timethese cmpthese/;
use DateTime;
use DateTime::TimeZone;
use Time::Piece ();
use Time::Piece::Plus ();
my $tz = DateTime::TimeZone->new(name => 'Asia/Tokyo');
@Songmu
Songmu / .screenrc
Created September 2, 2013 10:35
on server
escape ^t^t
startup_message off
vbell off
msgminwait 0
autodetach on
defscrollback 10000
defencoding utf8
cjkwidth on
term xterm-256color
package MyApp::DB;
use parent 'Teng';
...
sub handle_error {
my $self = shift;
my ($stmt, $bind, $reason) = @_;
$bind = [map {ref $_ eq 'ARRAY' ? $_->[0] : $_} @$bind];
using UnityEditor;
using UnityEngine;
using System.Collections;
using System.IO;
/// <summary>
/// 新規フォルダ作成時に.gitkeepを自動作成
/// </summary>
public class GitkeepMaker : AssetPostprocessor
{
using UnityEngine;
using UnityEditor;
using System.Collections;
public class BuildBatch : MonoBehaviour {
// build iOS app
private static void BuildiOS(){
Debug.Log("/////////// build start ///////////");
package MyWAF::Request;
use strict;
use warnings;
use parent 'Plack::Request';
use Encode;
use Hash::MultiValue;
use URL::Encode;
sub uri {
package Sub::Rate::Tags;
use strict;
use warnings;
use Carp;
use Any::Moose;
extends 'Sub::Rate::NoMaxRate';
has data => (
is => 'rw',
@Songmu
Songmu / app.sh
Last active December 18, 2015 04:48
#/bin/sh
NCPU=`getconf _NPROCESSORS_ONLN`
WORKERS=$(expr $NCPU \* 5)
exec plackup -E production -s Starlet --max-workers=$WORKERS
package MyApp::Validator;
use 5.016;
use warnings;
use utf8;
use parent 'Data::Validator';
use Try::Tiny;
sub import {
my $class = shift;
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;