Skip to content

Instantly share code, notes, and snippets.

@pobo380
pobo380 / orange_juice_review.txt
Last active November 22, 2021 01:46
orange_juice_review
① Shine&Shine : orange (ストレート)
果肉感 : ややあり
香り : オレンジよりはみかん寄り
甘さ : ふつう
酸味 : 後味に酸味が残る
苦味 : なし
② Wow COLD PRESS : Orchard Orange (ストレート/コールドプレス)
果肉感 : なし
香り : オレンジの香り
@pobo380
pobo380 / _vimrc
Created April 4, 2016 02:30
vimrc for VsVim
" tab
nnoremap J gT
nnoremap K gt
use strict;
use warnings;
use Test::More;
use List::Util qw/sum reduce/;
sub sample1 {
my ( $a, $b ) = @_;
if ( !$a && !$b ) {
return "hello";
@pobo380
pobo380 / get_exception_classes.rb
Created September 28, 2013 06:07
例外クラスの一覧を得る
Object.constants.sort.map{|e| Object.const_get(e.to_s) }.select{|e| e.kind_of?(Module) and e.ancestors.include?(Exception) }
h1. Git-Gendoc使い方
h2. 動作確認済みの環境
* Windows7
* RubyInstaller for Windows ruby 1.9.3-p194
* rubygems
* GitBash
h2. 動作環境を構築する
@pobo380
pobo380 / post-commit.rb
Created September 4, 2012 16:56
post-commit-hook-for-git
#!/usr/bin/ruby
require 'fileutils'
log = open('|git log HEAD -1 --name-only --pretty="format:"').read
base_changes = log.scan(/^base\/(.*)\.(textile|yaml)$/)
unless base_changes.empty?
base_changes.each do |path, ext|
src_path, dest_path = ['base/', 'html/'].map{|e| e + path}
@pobo380
pobo380 / app.rb
Created May 30, 2012 06:56
#8-2 管理画面の追加 (記事投稿を管理画面内へ)
# coding: utf-8
require 'rubygems'
require 'sinatra'
require 'sequel'
## DBへの接続
Sequel::Model.plugin(:schema)
DB = Sequel.sqlite('database.sqlite3')
## テーブルの定義
@pobo380
pobo380 / app.rb
Created May 30, 2012 06:49
#7 管理画面の追加 (記事の編集と削除)
# coding: utf-8
require 'rubygems'
require 'sinatra'
require 'sequel'
## DBへの接続
Sequel::Model.plugin(:schema)
DB = Sequel.sqlite('database.sqlite3')
## テーブルの定義
@pobo380
pobo380 / app.rb
Created May 30, 2012 06:20
#6 コメント機能の追加
# coding: utf-8
require 'rubygems'
require 'sinatra'
require 'sequel'
## DBへの接続
Sequel::Model.plugin(:schema)
DB = Sequel.sqlite('database.sqlite3')
## テーブルの定義
@pobo380
pobo380 / app.rb
Created May 30, 2012 05:54
#5 投稿日時の追加
# coding: utf-8
require 'rubygems'
require 'sinatra'
require 'sequel'
## DBへの接続
Sequel::Model.plugin(:schema)
DB = Sequel.sqlite('database.sqlite3')
## テーブルの定義