start new:
tmux
start new with session name:
tmux new -s myname
| require 'benchmark' | |
| ActiveRecord::Base.logger = nil | |
| Benchmark.bmbm do |bench| | |
| bench.report("SQL query") do | |
| 1000.times { Whatever.count } | |
| end | |
| bench.report("exception hit") do |
| # Additional translations at https://github.com/plataformatec/devise/wiki/I18n | |
| id: | |
| devise: | |
| confirmations: | |
| confirmed: 'Akun anda telah berhasil dikonfirmasi. Anda telah login.' | |
| send_instructions: 'Anda akan menerima e-mail berisi instruksi untuk melakukan konfirmasi akun dalam beberapa menit lagi.' | |
| send_paranoid_instructions: "Jika email anda benar-benar terdaftar, anda akan menerima email untuk mengkonfirmasi akun anda dalam beberapa menit lagi." | |
| failure: | |
| already_authenticated: "Anda telah login." |
| class PolicyTest < ActiveSupport::TestCase | |
| def assert_permissions(current_user, record, available_actions, permissions_hash = {}) | |
| permissions_hash.each do |action, should_be_permitted| | |
| if should_be_permitted | |
| assert_permit current_user, record, action | |
| else | |
| refute_permit current_user, record, action | |
| end | |
| end |
| gem 'active_model_serializers' | |
| gem 'activeadmin' | |
| gem 'jquery-ui-rails' |
| " tmux will only forward escape sequences to the terminal if surrounded by a DCS sequence | |
| " http://sourceforge.net/mailarchive/forum.php?thread_name=AANLkTinkbdoZ8eNR1X2UobLTeww1jFrvfJxTMfKSq-L%2B%40mail.gmail.com&forum_name=tmux-users | |
| if exists('$TMUX') | |
| let &t_SI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=1\x7\<Esc>\\" | |
| let &t_EI = "\<Esc>Ptmux;\<Esc>\<Esc>]50;CursorShape=0\x7\<Esc>\\" | |
| else | |
| let &t_SI = "\<Esc>]50;CursorShape=1\x7" | |
| let &t_EI = "\<Esc>]50;CursorShape=0\x7" | |
| endif |
| def triangle(a, b, c) | |
| raise TriangleError if a<=0 or b<=0 or c<=0 | |
| raise TriangleError if a+b<=c or b+c<=a or a+c<=b | |
| return :equilateral if a==b and a==c | |
| return :isosceles if a==b or b==c or a==c | |
| :scalene | |
| end |