Skip to content

Instantly share code, notes, and snippets.

View horaotoko's full-sized avatar

Masaya Nakazato horaotoko

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<meta content="application/html; charset=UTF-8" http-equiv="Content-Type" />
<meta content="text/css" http-equiv="Content-Style-Type" />
<meta content="text/javascript" http-equiv="Content-Script-Type" />
<title>
Test Post
- harmaa
</title>
@horaotoko
horaotoko / 5Thanks
Created July 6, 2012 13:04
5Thanks setup
cd 5Thanks
rvm use 1.9.2
gem install bundler
bundle
rake db:migrate
rails s
localhost:3000
______________
gem 'devise', '2.0.4'
bundle install --without=production:test
♪美味すぎて・・死者が蘇ってくるカレー♪
鍋のフタを開けると『ゔぁーああああー!』
と、うめき声が聞こえる。
ゾンビが本気で好きなあなたのために、研究し出会ったブレンドです♪
ユーザー名
ロメロ
材料 ( 8皿分 )
人肉 300グラム
タマネギ 2個
ロバの足 1本
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8" />
<title>カレーの作り方</title>
</head>
<body>
<header>
fjord流カレーの作り方
</header>
bundle install --binstubsをすると
Installing json (1.7.5)
Errno::EPERM: Operation not permitted - /Users/nakazatomasaya/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.5/.gitignore
An error occurred while installing json (1.7.5), and Bundler cannot continue.
Make sure that `gem install json -v '1.7.5'` succeeds before bundling.
jsonの部分でエラーが出る。なので
gem install json -v '1.7.5'をすると
Installing mysql2 (0.3.11) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/nakazatomasaya/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb
checking for rb_thread_blocking_region()... yes
checking for rb_wait_for_single_fd()... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... yes
@horaotoko
horaotoko / gist:3857368
Created October 9, 2012 08:33
子ページ取得
<?php
$page_id = mysql_real_escape_string( $post -> ID );
$array = $wpdb -> get_results( "SELECT ID, post_title, post_content FROM $wpdb->posts WHERE post_parent = '$page_id' AND post_status = 'publish'" );
foreach ( $array as $value ) {
echo '<h2><a href="' . get_permalink( $value -> ID ) . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), esc_attr( strip_tags( $value -> post_title ) ) ) . '" rel="bookmark">' . esc_attr( strip_tags( $value -> post_title ) ) . '</a></h2>' . "\n";
echo apply_filters( 'the_content', $value -> post_content );
}
?>
@horaotoko
horaotoko / mysqlのインストールでつまったところ
Last active December 20, 2015 13:09
mysqlのインストールでつまったところ
before brew update
$ brew install imagemagick mysql qt
Error: You must `brew link libtool' before imagemagick can be installed
Error: mysql-5.5.27 already installed
To install this version, first `brew unlink mysql'
Error: qt-4.8.4 already installed
$ brew link libtool
Linking /usr/local/Cellar/libtool/2.4.2... 17 symlinks created
@horaotoko
horaotoko / gist:500ddbd63f55a71f2208
Last active August 29, 2015 14:07
brewでインストールしたrbenvのアップデート方法
% brew update
% brew upgrade rbenv ruby-build

または

% rm -rf ~/.rbenv/plugins/ruby-build
% bundle                
Fetching gem metadata from https://rubygems.org/........
Using rake 12.3.1
Using concurrent-ruby 1.1.3
Using i18n 0.9.5
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.11