This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encoding: utf-8 -*- | |
require "net/http" | |
require "uri" | |
class OpenTcoUrl | |
def initialize; end | |
def open_tco_url tco_url | |
result = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
class String | |
def kaibun | |
self + self[0..-2].reverse | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- encode:utf-8 -*- | |
require 'mechanize' | |
agent = Mechanize.new { |a| | |
a.user_agent_alias = 'Mac Safari' | |
a.max_history = 0 | |
} | |
agent.get('http://coderwall.com/teams/4f61c42bdb6418000a000001') do |page| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
HOST='localhost' | |
USER='ID' | |
PASS='PASS' | |
DBNAME='DBNAME' | |
TABLENAME='TABLENAME' | |
PREVIOUSMONTH=`mysql -h $HOST -u $USER -p$PASS -e 'SHOW CREATE TABLE '$DBNAME'.'$TABLENAME'\G' | | |
tail -n 2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# userバーティションを拡張 | |
HOST='127.0.0.1' | |
USER='hoge' | |
PASS='fuga' | |
DBNAME='piyo' | |
TABLENAME='oreo' | |
NUMPERPARTITION=50000 #インクリメントする値 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
deployment: | |
name: "dea" | |
domain: "hoge.com" #使用するドメイン | |
jobs: | |
install: | |
- stager | |
- dea: | |
local_route: "192.168.249.44" #自分の環境に合わせる (この設定ファイルが置かれるDEAのIPアドレス) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub _parse_response | |
{ | |
my $this = shift; | |
my $res = shift; | |
my $req = shift; | |
my $full_ch_name = $req->{full_ch_name}; | |
$DEBUG and $this->_debug($req, "_parse_response."); | |
my $result = { | |
result => undef, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mysqld_safe --skip-grant-tables |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
====================================================================================================================================================================================================================================================================================================================================================== | |
Package Arch Version Repository Size | |
=================================================================================================================================================================================================================================================================================================================================================== |