WordPress に Gist コードを埋め込む Embed GitHub Gist
WordPressのコード埋め込みはGistでいいんじゃないかな
これいいと思った。
WordPress › Embed GitHub Gist « WordPress Plugins
手順レベルのものを gist にぺたぺたしてるし、
なによりシンタックスハイライト系がエンティティエンティティするからもういらついていらついて。
こんな感じで VMware せこせこ作ってる
yum install readline-devel.x86_64 libyaml.x86_64 tree nkfyum install mysql mysql-server gityum install readline-devel.x86_64 libyaml.x86_64 openssl-devel.x86_64 mysql-devel.x86_64yum install gcc make zlib-devel gcc-c++
git clone git://github.com/sstephenson/rbenv.git .rbenvecho 'export PATH="$HOME/.rbenv/bin:$PATH"' >> $HOME/.bashrcecho 'eval "$(rbenv init -)"' >> $HOME/.bashrcecho "source ~/.rbenv/completions/rbenv.bash" >> $HOME/.bashrccd $HOMEgit clone git://github.com/sstephenson/ruby-build.gitcd $HOME/ruby-buildsudo ./install.sh
rbenv-install 1.9.3-p0rbenv global 1.9.3-p0rbenv rehashrbenv versionsrbenv exec gem install rails pry pry-doc
cd /path/to/railsdir/
cat << EOS > Gemfilesource "http://rubygems.org"gem "rails", '~>3.2.0.rc2'EOS
bundle install --path vendor/bundlebundle exec rails new railsapp -d mysql rm -f Gemfilerm -f Gemfile.lockrm -rf .bundle
cd railsapp #Gemfile追記 gem 'therubyracer'bundle install --path vendor/bundlebundle exec rails g scaffold post title:string body:text
# sl は $releasever をベタ書きcat > /etc/yum.repos.d/nginx.repo <<'nginxREPO'[nginx]name=nginx repobaseurl=http://nginx.org/packages/rhel/6/$basearch/gpgcheck=0enabled=1nginxREPO
# ばっといれとく curl-devel は passenger あたりで言われるyum install gcc pcre* zlib* openssl* gd* libpng* libjpeg* GeoIP* curl-devel
# /etc/init.d/nginx ファイルが欲しいyum install nginxcp -a /etc/init.d/nginx /root/yum remove nginx
# rbenv 使ってるユーザで$ rbenv exec gem install rake$ rbenv exec gem install passenger
# nginx 入れるexport nginx_ver="1.1.14"export nginx_configure_script="nginx_configure_`echo ${nginx_ver}|sed -e 's/\./_/g'`.sh"mkdir /usr/local/src/NGINX/cd /usr/local/src/NGINXwget http://nginx.org/download/nginx-${nginx_ver}.tar.gztar zxvf nginx-${nginx_ver}.tar.gz
echo '#!/bin/sh
NGINX=nginx-NGINX_VERSOURCE_DIR=/usr/local/src/NGINXid nginx || sudo useradd -s /sbin/nologin -d /usr/local/nginx -M nginx cd $SOURCE_DIR/$NGINX[ -e "$SOURCE_DIR/$NGINX/Makefile" ] && make clean./configure \ --prefix="/usr/local/nginx" \ --conf-path=/etc/nginx/nginx.conf \ --error-log-path=/var/log/nginx/error.log \ --pid-path=/var/run/nginx/nginx.pid \ --lock-path=/var/lock/nginx.lock \ --user=nginx \ --group=nginx \ --with-http_stub_status_module \ --with-http_ssl_module \ --with-http_gzip_static_module \ --with-http_realip_module \ --http-log-path=/var/log/nginx/access.log \ --http-client-body-temp-path=/var/tmp/nginx/client/ \ --http-proxy-temp-path=/var/tmp/nginx/proxy/ \ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \ --with-cc-opt="-Wno-error" \ --add-module="/home/USER/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/passenger-3.0.11/ext/nginx" \&& make' | sed -e "s/NGINX_VER/${nginx_ver}/g" > /usr/local/src/${nginx_configure_script}
# でpassengerのコンパイルで使う rake を root が見つけられずで実行できないから、# /home/USER/.rbenv/shims を PATHに追加しちまったよ# このやり方賢くない……
sh /usr/local/src/${nginx_configure_script}cd /usr/local/src/NGINX/${nginx_ver}make install
# とりあえずここまで# sl は $releasever をベタ書きcat > /etc/yum.repos.d/nginx.repo <<'nginxREPO'[nginx]name=nginx repobaseurl=http://nginx.org/packages/rhel/6/$basearch/gpgcheck=0enabled=1nginxREPO
# ばっといれとく curl-devel は passenger あたりで言われるyum install gcc pcre* zlib* openssl* gd* libpng* libjpeg* GeoIP* curl-devel
# /etc/init.d/nginx ファイルが欲しいyum install nginxcp -a /etc/init.d/nginx /root/yum remove nginx
# rbenv 使ってるユーザで$ rbenv exec gem install rake$ rbenv exec gem install passenger
# nginx 入れるexport nginx_ver="1.1.14"export nginx_configure_script="nginx_configure_`echo ${nginx_ver}|sed -e 's/\./_/g'`.sh"mkdir /usr/local/src/NGINX/cd /usr/local/src/NGINXwget http://nginx.org/download/nginx-${nginx_ver}.tar.gztar zxvf nginx-${nginx_ver}.tar.gz
echo '#!/bin/sh
NGINX=nginx-NGINX_VERSOURCE_DIR=/usr/local/src/NGINXid nginx || sudo useradd -s /sbin/nologin -d /usr/local/nginx -M nginx cd $SOURCE_DIR/$NGINX[ -e "$SOURCE_DIR/$NGINX/Makefile" ] && make clean./configure \ --prefix="/usr/local/nginx" \ --conf-path=/etc/nginx/nginx.conf \ --error-log-path=/var/log/nginx/error.log \ --pid-path=/var/run/nginx/nginx.pid \ --lock-path=/var/lock/nginx.lock \ --user=nginx \ --group=nginx \ --with-http_stub_status_module \ --with-http_ssl_module \ --with-http_gzip_static_module \ --with-http_realip_module \ --with-http_geoip_module \ --http-log-path=/var/log/nginx/access.log \ --http-client-body-temp-path=/var/tmp/nginx/client/ \ --http-proxy-temp-path=/var/tmp/nginx/proxy/ \ --http-fastcgi-temp-path=/var/tmp/nginx/fcgi/ \ --with-cc-opt="-Wno-error" \ --add-module="/home/USER/.rbenv/versions/1.9.3-p0/lib/ruby/gems/1.9.1/gems/passenger-3.0.11/ext/nginx" \&& make' | sed -e "s/NGINX_VER/${nginx_ver}/g" > /usr/local/src/${nginx_configure_script}
# でpassengerのコンパイルで使う rake を root が見つけられずで実行できないから、# /home/USER/.rbenv/shims を PATHに追加しちまったよ# このやり方賢くない……
sh /usr/local/src/${nginx_configure_script}cd /usr/local/src/NGINX/${nginx_ver}make install
# とりあえずここまで