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/bash | |
git fetch | |
git log --name-status ..origin/master | grep -P '[ACDMRTUXB]\t' |
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
use strict; | |
use warnings; | |
use Plack::Builder; | |
use Plack::App::Directory; | |
use Munin; | |
use Date::Manip; | |
use POSIX qw(strftime); | |
use File::Slurp; | |
my $GRAPHER = "/usr/share/munin/munin-graph"; |
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
--- innobackupex-1.5.1.org 2010-12-09 23:03:09.000000000 +0900 | |
+++ innobackupex-1.5.1 2011-01-07 01:28:20.000000000 +0900 | |
@@ -1333,10 +1333,19 @@ | |
print FILE "CHANGE MASTER TO MASTER_LOG_FILE='$filename', MASTER_LOG_POS=$position\n"; | |
close(FILE); | |
+ my $orig_datadir = get_option(\%config, 'mysqld', 'datadir'); | |
+ | |
if ($option_stream eq 'tar') { | |
+ system("cd $orig_datadir; tar chf - master.info") |
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
# SnipMate is required to use snippets | |
# Download SnipMate: http://www.vim.org/scripts/script.php?script_id=2540 | |
# Put this file in ~/.vim/snippets/ then restart vim | |
# This snippet file includes many useful snippets for CodeIgniter. Please feel free to fork and contribute! | |
snippet php | |
<?php | |
${1} | |
?> | |
snippet ec | |
echo "${1:string}"${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
#!/usr/bin/python | |
# vim:set fileencoding=utf-8 sw=2 ai: | |
import sqlite3 | |
import datetime | |
import re | |
SQL = ''' | |
select | |
name, version, time, author, text |
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
<?php | |
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ | |
// created by bto | |
// via http://blog.bz2.jp/archives/2008/05/1php.html | |
// http://blog.bz2.jp/archives/2008/05/singleexecution.html | |
class singleExecution | |
{ | |
var $key = null; | |
var $options = array( |
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 -*- | |
# Rubyだったら正規表現はすごい簡単だよ!!! | |
# 他の言語ではいくつかパターンがありますが、自分はRubyほど楽に正規表現を利用できる言語を知りません。 | |
msg = "まなさん大好き" | |
# Ruby では正規表現リテラルがあります。 | |
# // のリテラルはそれだけで正規表現のリテラルです | |
# かなりperl的なのです^q^ |
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
function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s } | |
function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s } | |
function trim(s) { return rtrim(ltrim(s)); } | |
BEGIN { | |
# whatever | |
} | |
{ | |
# whatever | |
} | |
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
$ curl -kL https://raw.github.com/riywo/App-llenv/master/llenv-install | bash | |
and add your .bashrc or something | |
export LLENV_ROOT=$HOME/llenv | |
export LLENV_OSTYPE=`$LLENV_ROOT/bin/ostype` | |
export PATH=$LLENV_ROOT/bin:$PATH | |
$ llinstall init perl | |
$ llinstall install perl perl-5.14.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
function verify_app_store_in_app($receipt, $is_sandbox) | |
{ | |
//$sandbox should be TRUE if you want to test against itunes sandbox servers | |
if ($is_sandbox) | |
$verify_host = "ssl://sandbox.itunes.apple.com"; | |
else | |
$verify_host = "ssl://buy.itunes.apple.com"; | |
$json='{"receipt-data" : "'.$receipt.'" }'; | |
//opening socket to itunes |
OlderNewer