Skip to content

Instantly share code, notes, and snippets.

View memememomo's full-sized avatar
🏠
Working from home

Uchiko memememomo

🏠
Working from home
  • Aichi, Japan
View GitHub Profile
@memememomo
memememomo / replace.go
Last active August 29, 2015 14:08
Go言語で後方参照を用いた置換処理 ref: http://qiita.com/uchiko/items/ad3ffc61448b322f43f6
package main
import (
"fmt"
"regexp"
)
func main() {
str := "テスト1{T_NAME}テスト2{T_AGE}テスト3"
re, err := regexp.Compile("{T_(.+?)}")
package main
import (
"code.google.com/p/go.text/encoding/japanese"
"code.google.com/p/go.text/transform"
"fmt"
"io/ioutil"
"strings"
)
package main
import (
"bufio"
"fmt"
"net"
"strconv"
)
// ポート番号
sat p = do x <- item
if p x then return x else failure
@memememomo
memememomo / shell
Created October 14, 2014 08:31
「warning: already initialized constant APP_PATH」というエラーが出た ref: http://qiita.com/uchiko/items/0979057f1045d43e8f8f
sudo ln -s /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/lib/libmysqlclient.18.dylib
@memememomo
memememomo / private.xml
Last active August 29, 2015 14:07
Macの外付けキーボード設定まとめ ref: http://qiita.com/uchiko/items/d55f01f65f12d86f628d
<?xml version="1.0"?>
<root>
<appdef>
<appname>iTERM2</appname>
<equal>com.googlecode.iterm2</equal>
</appdef>
<appdef>
<appname>MACVIM</appname>
<equal>org.vim.MacVim</equal>
</appdef>
@memememomo
memememomo / file0.txt
Last active August 29, 2015 14:07
Ubuntuでのresolv.confの扱い ref: http://qiita.com/uchiko/items/eb0665f528e2bb792f47
dns-nameservers 8.8.8.8
@memememomo
memememomo / Gemfile
Created September 10, 2014 07:14
mysql2-cs-bind + sql-maker で、MySQLを操作するスクリプトを書く ref: http://qiita.com/uchiko/items/899aeb85ac408f254545
# A sample Gemfile
source "https://rubygems.org"
gem 'sql-maker'
gem 'mysql2-cs-bind'
@memememomo
memememomo / file0.txt
Created August 7, 2014 02:26
oilを実行したPHPで、PHPUnitを実行する ref: http://qiita.com/uchiko/items/1f7bea53bd2b8130d6fa
・oilの実行PHP
/Users/Uchiko/.phpenv/versions/5.5.15/bin/php
・phpunitの実行PHP
/usr/bin/php
@memememomo
memememomo / migrations.php
Created August 5, 2014 10:45
DBを直接削除しただけでは、マイグレーションはうまく動かない ref: http://qiita.com/uchiko/items/8ba85d9bba26bb2fa552
<?php
return array(
'version' =>
array(
'app' =>
array(
'default' =>
array(
),
),