Skip to content

Instantly share code, notes, and snippets.

@14021939
14021939 / index.html
Created April 11, 2012 11:24
iframe preview
<div class="preview" style="visibility: hidden">
<iframe src='preview.html' id="preview"></iframe>
</div>
@14021939
14021939 / change_bunner.js
Created April 11, 2012 12:07
bunner_image_change by auto and navi_buttun
$(function(){
var items_count=$("#change_advertisements li").size();
if(items_count < 1) return; //バナーが一つしかない場合は処理を行わない
var interval=7e3;
var target_index=1;
var change_bunner=function(){
var target = $("a.advertisement_link:eq("+target_index+")");
@14021939
14021939 / rubydebug_with_ruby-1.9.3-p125_on_netbeans
Created May 22, 2012 06:24
rubydebug with ruby-1.9.3-p125
# Install with:
# bash < <(curl -L https://raw.github.com/gist/2767067)
#
# Reference: http://bismar.hatenablog.com/entry/2012/05/22/163305
echo "Installing rubydebug- with ruby-1.9.3-p125 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
curl -OL http://rubyforge.org/frs/download.php/64707/ruby-debug-ide19-0.4.12.gem
@14021939
14021939 / rubydebug_with_ruby-1.9.3-p194
Created June 28, 2012 13:01
rubydebug with ruby-1.9.3-p194
# Install with:
# bash < <(curl -L https://raw.github.com/gist/3011250)
#
# Reference: http://bismar.hatenablog.com/entry/2012/05/22/163305
echo "Installing rubydebug with ruby-1.9.3-p194 ..."
curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem
curl -OL http://rubyforge.org/frs/download.php/75415/ruby-debug-base19-0.11.26.gem
curl -OL http://rubyforge.org/frs/download.php/64707/ruby-debug-ide19-0.4.12.gem
@14021939
14021939 / development.rb
Created March 11, 2013 10:03
Rails3.0.x -> 3.2.x (´∀`∩)↑age↑ ref: http://qiita.com/items/b9c38281147c4cbce183
config.active_record.mass_assignment_sanitizer = :strict
config.active_record.auto_explain_threshold_in_seconds = 0.5
@14021939
14021939 / file0.txt
Created March 16, 2013 10:27
【rvm】Ruby 2.0.0 安定版 インストール ref: http://qiita.com/items/d9edc771d10bb89ef0f0
rvm install 2.0.0
@14021939
14021939 / file0.txt
Created October 24, 2013 11:38
RでMySQLデータベース上のデータを操作する ref: http://qiita.com/14021939/items/ccd5284070ce4f448a12
$ sudo R
> install.packages("DBI")
> install.packages("RMySQL")
@14021939
14021939 / file0.txt
Created October 29, 2013 06:51
Rのデータフレーム(data.frame)について ref: http://qiita.com/14021939/items/3436a153119bb88d49df
$ R
> name <- c('suzuki','sato','yamada')
> height <- c('172','165','184')
> weight <- c('60','58','75')
> users_table <- data.frame(name,height,weight)
> users_table
name height weight
1 suzuki 172 60
2 sato 165 58
3 yamada 184 75
@14021939
14021939 / file0.txt
Created October 29, 2013 07:04
MacOSをmavericksにアップグレードしたらnokogiriをインストールできなくなった。 ref: http://qiita.com/14021939/items/d40668bdc6bed3f82e62
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/me/.rvm/rubies/ruby-1.9.3-p429/bin/ruby extconf.rb
Extracting libxml2-2.8.0.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxml2/2.8.0... OK
Running 'configure' for libxml2 2.8.0... OK
Running 'compile' for libxml2 2.8.0... OK
Running 'install' for libxml2 2.8.0... OK
Activating libxml2 2.8.0 (from /Users/me/.rvm/gems/ruby-1.9.3-p429@myapp/gems/nokogiri-1.6.0/ports/x86_64-apple-darwin13.0.0/libxml2/2.8.0)...
Extracting libxslt-1.1.26.tar.gz into tmp/x86_64-apple-darwin13.0.0/ports/libxslt/1.1.26... OK
Running 'configure' for libxslt 1.1.26... OK
@14021939
14021939 / file0.rb
Created February 18, 2014 11:18
RailsでTimeZone系のいろいろを取得する ref: http://qiita.com/14021939/items/414beba5c6fc001382f8
tz_countries = TZInfo::Country.all