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
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 / 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
$ 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
We couldn’t find that file to show.
@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'
#!/bin/bash
read_response() {
while read -u9 LINE; do
declare more_response=${LINE:3:1}
echo $LINE
[ "$more_response" != '-' ] && break
done
}
MYDIR=$(cd $(dirname $0) && pwd)
IPA="$1"
PROVISION="$2"
CERTIFICATE="$3"
usage() {
echo "Usage: $0 <ipa file> <provision profile> <certificate name>" >&2
exit 99
}
@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 '検査するオブジェクト
@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 dgbadmin@gmail.com
* @license http://0-oo.net/pryn/MIT_license.txt (The MIT license)
*/
class CodeBook {
/** PKCS#5でパディング */
@comuttun
comuttun / UpdatingRootCACerts.md
Created March 9, 2013 18:25
Updating root CA certs

Updating root CA certs

From Stackoverflow

Linux, Cygwin, etc

$ cd /usr/ssl/certs
$ curl http://curl.haxx.se/ca/cacert.pem | awk 'split_after==1{n++;split_after=0} /-----END CERTIFICATE-----/ {split_after=1} {print &gt; "cert" n ".pem"}'