Skip to content

Instantly share code, notes, and snippets.

View iakio's full-sized avatar

ISHIDA Akio iakio

View GitHub Profile
[prod]
host=service-prod.xxxxxxxxxxxx.ap-northeast-1.rds.amazonaws.com
user=username
dbname=mydb
[dev]
host=service-dev.xxxxxxxxxxxx.ap-northeast-1.rds.amazonaws.com
user=username
dbname=mydb
--TEST--
Hello
--FILE--
<?php
$conn = new PDO("pgsql:options='-c client_encoding=utf8'", "postgres");
$stmt = $conn->query("show client_encoding");
echo $stmt->fetchColumn(0), PHP_EOL;
$conn = new PDO("pgsql:options='-c client_encoding=sql_ascii'", "postgres");
$stmt = $conn->query("show client_encoding");
{
"version": "2.29",
"license": "",
"extract_dir": "",
"url": "http://downloads.sourceforge.net/project/keepass/KeePass%202.x/2.29/KeePass-2.29.zip",
"depends": "",
"homepage": "http://keepass.info/",
"hash": "2d3d4207583d4e9c4fc289299fcc02387d7778209972c0cc00f14e9512aaa79b",
"bin": "KeePass.exe"
}
highlight MatchParen cterm=underline ctermbg=0 ctermfg=250
<?php
namespace spec;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class ExampleSpec extends ObjectBehavior
{
function let(\StdClass $obj1, \StdClass $obj2)
#!env ruby
require "rspec/core/formatters/base_text_formatter"
f = RSpec::Core::Formatters::BaseTextFormatter.new(nil)
RSpec::Core::Formatters::BaseTextFormatter::VT100_COLORS.each do |k, v|
puts f.colorize(k.to_s, v)
end
red, green, blue = 4, 1, 1
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "precise32"
config.vm.provision "shell", path: "provison_root.sh"
config.vm.provision "shell", path: "provison_vagrant.sh"
config.vm.box_url = "http://files.vagrantup.com/precise32.box"
end
@iakio
iakio / gist:7231100
Created October 30, 2013 11:26
set return functionの引数が他のテーブルを参照していたらどうなるのか
ishida=# select * from generate_series(1, 3) as i, generate_series(1, i) as j;
i | j
---+---
1 | 1
2 | 1
2 | 2
3 | 1
3 | 2
3 | 3
(6 行)
<?php
class FooTest extends PHPUnit_Framework_TestCase
{
/** @runInSeparateProcess */
function testFoo() { $this->fail(); }
function prepareTemplate(Text_Template $tpl) {
echo $tpl->render();
exit;
}
var formTable = $(".category-32, .category-33, .category-34")
.find("table.entryFormTable");
$("tr:eq(3), tr:eq(4), tr.detail-fade", formTable).css(
"display", "none"
);