Skip to content

Instantly share code, notes, and snippets.

View comuttun's full-sized avatar

KOMATSU Seiji comuttun

  • Magmag, Inc.
  • Yokohama, Japan
View GitHub Profile
@comuttun
comuttun / CodeBook.php
Last active November 10, 2022 07:51
PHP Encrypt Sample with CodeBook.php
<?php
/**
* CodeBook.php
* @version 0.2.1
* @see http://0-oo.net/sbox/php-tool-box/code-book
* @copyright 2009-2011 [email protected]
* @license http://0-oo.net/pryn/MIT_license.txt (The MIT license)
*/
class CodeBook {
/** PKCS#5でパディング */
@comuttun
comuttun / SelectAllShapesInRegion.vba
Created January 21, 2014 05:50
Select all shapes in region at Microsoft Excel 2011 (mac).
' This code is from http://social.msdn.microsoft.com/Forums/ja-JP/f0993879-8bb8-4e31-9198-8b378615379f/excel2011macvba?forum=vbajp
Sub SelectAllShapesInRegion()
'Shapesかセル範囲を選んで起動すると、その範囲内のShapeを選択する。
'
Dim i As Integer '選択するアイテム番号配列の添字
Dim j As Integer 'シート内Shapesのアイテム番号
Dim k As Integer 'シート内にあるShapeオブジェクトの数
'
Dim temp As Integer '起動前に選ばれているオブジェクトの位置
Dim o As Object '検査するオブジェクト
MYDIR=$(cd $(dirname $0) && pwd)
IPA="$1"
PROVISION="$2"
CERTIFICATE="$3"
usage() {
echo "Usage: $0 <ipa file> <provision profile> <certificate name>" >&2
exit 99
}
#!/bin/bash
read_response() {
while read -u9 LINE; do
declare more_response=${LINE:3:1}
echo $LINE
[ "$more_response" != '-' ] && break
done
}
@comuttun
comuttun / file0.sh
Created June 21, 2014 17:09
Docker で SSH 接続可能なコンテナ (CentOS) を作成する ref: http://qiita.com/comutt/items/1251cc19885947cd6d3d
alias ssh-ignorekey='ssh -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no'
We couldn’t find that file to show.
$ git checkout -b v1.6.3+pr-1131 v1.6.3
Switched to a new branch 'v1.6.3+pr-1131'
$ git fetch upstream
remote: Counting objects: 995, done.
remote: Compressing objects: 100% (734/734), done.
remote: Total 995 (delta 523), reused 622 (delta 233)
Receiving objects: 100% (995/995), 408.56 KiB | 360.00 KiB/s, done.
Resolving deltas: 100% (523/523), done.
From https://github.com/sparklemotion/nokogiri
* [new ref] refs/pull/1001/head -> upstream/pr/1001
@comuttun
comuttun / Apache Redirection Sample
Last active August 29, 2015 14:04
Apache Redirection Sample
This is a sample configuration for Apache. * http://example.com/.* redirects all to http://example.jp
service "httpd" do
supports :restart => true
action :nothing
end
file "/etc/httpd/conf.d/proxy_ajaxterm.conf" do
action :delete
only_if { File.exists?("/etc/httpd/conf.d/proxy_ajaxterm.conf") }
notifies :restart, "service[httpd]"
end
@comuttun
comuttun / KeySetting.diff
Created October 19, 2014 18:38
Change Space and Shift+Space behavior for JapaneseIM on OS X Yosemite
diff --git a/KeySetting_Ainu.plist b/KeySetting_Ainu.plist
index 197b151..809b6b8 100644
--- a/KeySetting_Ainu.plist
+++ b/KeySetting_Ainu.plist
@@ -13,14 +13,14 @@
<key>command</key>
<string>direct_input</string>
<key>character</key>
- <string> </string>
+ <string> </string>