Skip to content

Instantly share code, notes, and snippets.

View miya0001's full-sized avatar

Takayuki Miyauchi miya0001

View GitHub Profile
@miya0001
miya0001 / gist:8747199
Last active August 29, 2015 13:55
Concrete5 Setup for Ubuntu on the EC2
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
apt-get update -y
apt-get upgrade -y
apt-get install -y git ruby1.9.3 libxslt-dev libxml2-dev make
curl -L https://www.opscode.com/chef/install.sh | bash
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
locale-gen en_US.UTF-8
dpkg-reconfigure locales
apt-get update -y
apt-get upgrade -y
apt-get install -y git ruby1.9.3 libxslt-dev libxml2-dev make
curl -L https://www.opscode.com/chef/install.sh | bash
@miya0001
miya0001 / gist:9503977
Created March 12, 2014 09:57
Vagrant Cloud経由でWordPressにアクセスがあった時のリクエストヘッダー
array(8) {
["Host"]=>
string(35) "dawdling-crow-8670.vagrantshare.com"
["User-Agent"]=>
string(120) "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.146 Safari/537.36"
["Accept"]=>
string(74) "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
["Accept-Encoding"]=>
string(17) "gzip,deflate,sdch"
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
@miya0001
miya0001 / gist:9589994
Last active August 29, 2015 13:57
指定されたインスタンスIDのec2のスナップショットの作成と削除を許可するIAMのテンプレート
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ec2:CreateSnapshot",
"ec2:DeleteSnapshot"
],
"Resource": [
./wp-includes/author-template.php:function the_author( $deprecated = '', $deprecated_echo = true ) {
./wp-includes/author-template.php:function the_modified_author() {
./wp-includes/author-template.php:function the_author_meta( $field = '', $user_id = false ) {
./wp-includes/author-template.php:function the_author_link() {
./wp-includes/author-template.php:function the_author_posts() {
./wp-includes/author-template.php:function the_author_posts_link($deprecated = '') {
./wp-includes/category-template.php:function the_category( $separator = '', $parents='', $post_id = false ) {
./wp-includes/category-template.php:function the_tags( $before = null, $sep = ', ', $after = '' ) {
./wp-includes/category-template.php:function the_terms( $id, $taxonomy, $before = '', $sep = ', ', $after = '' ) {
./wp-includes/feed.php:function the_title_rss() {
@miya0001
miya0001 / gist:9720646
Created March 23, 2014 09:15
~/.subversion/config の例(いまさらsvnを使うのはWordPressぐらいだから。。。ってのが前提)
global-ignores = npm-debug.log .git* node_modules LINGUAS Makefile .DS_Store *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__
@miya0001
miya0001 / gist:10442694
Created April 11, 2014 05:43
AWS+Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "chef/ubuntu-13.10"
config.vm.network :private_network, ip: "192.168.33.10"
@miya0001
miya0001 / gist:10449520
Last active August 29, 2015 13:59
WordPress 3.8以前のバージョンでIE11を使った時にビジュアルエディターが不具合を起こすときの対処法
<?php
add_action( 'admin_init', 'my_admin_init');
function my_admin_init(){
header('X-UA-Compatible: IE=9');
// header('X-UA-Compatible: IE=10'); // 使ってるプラグインによってはie10のほうがいいかも?
}
@miya0001
miya0001 / gist:dc879ca3bbfcdac1d815
Created June 19, 2014 05:34
Vagrant+AWSでCKANを起動
# encoding: utf-8
# vim: ft=ruby expandtab shiftwidth=2 tabstop=2
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "dummy"
config.vm.box_url = "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box"