#NAME
macwland - Mac 無線変更検知フレームワークのサンプル
#SYNOPSIS
macwland &
#DESCRIPTION
| package My::QudoWorker; | |
| use base 'Qudo::Worker'; | |
| use Data::Dumper; | |
| sub work { | |
| my ($class, $job) = @_; | |
| print $job->arg; #print $user->email; |
| #!/usr/bin/env perl | |
| # xtetsuji by 2014/04/19 | |
| our $VERSION = "0.01"; | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| use AnyEvent; |
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| use utf8; | |
| binmode STDOUT, ':utf8'; | |
| use DBI; | |
| my $dbfile = "mydb.sqlite3"; | |
| my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","",""); |
| #!/bin/bash | |
| # plenvを自動的に入れてくれるやつです | |
| set -e | |
| if [[ $(which plenv 2> /dev/null) ]]; then | |
| echo 'plenv already installed.' | |
| elif [[ ! $(which git) ]]; then | |
| echo 'git is not installed!!!!!!!' | |
| exit 1; |
#NAME
macwland - Mac 無線変更検知フレームワークのサンプル
#SYNOPSIS
macwland &
#DESCRIPTION
| #!/bin/sh | |
| # | |
| # Forked at 2014/08/12 | |
| # Modifier: OGATA Tetsuji <github:xtetsuji> | |
| # Source: https://gist.github.com/xtetsuji/d82125bfab2247d6cc96 | |
| # | |
| # Thanks to original: | |
| # File: check_mysql_slavestatus.sh | |
| # Release Version: 0.1.1 | |
| # Created 2012/12/10 |
| #include <stdio.h> | |
| int main(int a, char *b[]) { | |
| int i, j; | |
| char buf[256]; | |
| char *get[6] = { | |
| "今だ!w番ゲットォォォォ!!", | |
| " ̄ ̄ ̄ ̄ ̄∨ ̄ ̄ ̄ (´´", | |
| " ∧ ∧ (´⌒(´", | |
| " ⊂(゚Д゚⊂⌒`つ≡≡≡(´⌒;;;≡≡≡", | |
| "  ̄ ̄ (´⌒(´⌒;;", |
| #!/usr/bin/perl | |
| # ファイルの冒頭にデータを追加する | |
| # open my $fh, '>>', $file; は末尾追加になるのでこれをどうするか | |
| # 超巨大なファイルを想定して、一時ファイルを作る方法で丸呑みを最小限にして | |
| # メモリ消費をおさえて書き直すという作戦を取る | |
| use strict; | |
| use warnings; | |
| use File::Copy qw(move); |
| ### まずは ls -l ~/.plenv の中を見てみる | |
| ogata@macbookair:~$ ls -l ~/.plenv | |
| total 88 | |
| -rw-r--r-- 1 ogata staff 3399 2 3 2014 Changes | |
| -rw-r--r-- 1 ogata staff 18359 2 3 2014 LICENSE | |
| -rw-r--r-- 1 ogata staff 546 2 3 2014 Makefile | |
| -rw-r--r-- 1 ogata staff 12025 2 3 2014 README.md | |
| drwxr-xr-x 3 ogata staff 102 2 3 2014 author/ | |
| drwxr-xr-x 3 ogata staff 102 2 3 2014 bin/ | |
| drwxr-xr-x 4 ogata staff 136 5 27 19:56 build/ |
| #!/usr/bin/env perl | |
| use strict; | |
| use warnings; | |
| BEGIN { | |
| *CORE::GLOBAL::ref = sub { return "HELLO"; }; | |
| } | |
| my $hash = { |