kubectl get pods
kubectl exec -it pod-name -- /bin/bash
[alias] | |
st = status | |
di = diff | |
co = checkout | |
ci = commit | |
br = branch | |
sta = stash | |
llog = log --date=local | |
flog = log --pretty=fuller --decorate | |
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "rails", github: "rails/rails", tag: 'v5.0.0' |
begin | |
require "bundler/inline" | |
rescue LoadError => e | |
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
raise e | |
end | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "rails", github: "rails/rails", tag: 'v4.2.6' |
<!DOCTYPE html> | |
<meta charset="utf-8" /> | |
<title>WebSocket Test</title> | |
<script language="javascript" type="text/javascript"> | |
var wsUri = "ws://localhost:3000/cable"; | |
var output; | |
function init() | |
{ |
Benchmark.bmbm do |x| | |
x.report { 100000000.times{ 14.between?(10,20)}} | |
x.report{ 100000000.times{(10..20).member?(14)}} | |
x.report{ 100000000.times{(10..20).include?(14)}} | |
end | |
# result | |
# Rehearsal ------------------------------------ | |
# 14.030000 0.010000 14.040000 ( 14.028154) |
a = {:a =>[1,2,3], :b => 'Sample String'} | |
# { | |
# :a => [ | |
# [0] 1, | |
# [1] 2, | |
# [2] 3 | |
# ], | |
# :b => "Sample String" | |
# } |
require 'awesome_print' | |
# false | |
test_data = {:a => 'Ruby in Rails String', :b => {:array => [1,2,3]}} | |
# {:a => 'Ruby in Rails String', :b => {:array => [1,2,3]}} | |
ap test_data | |
# { | |
# :a => "Ruby in Rails String", |
<div id='will_paginate_id'> | |
<%= will_paginate @users, :params => {:is_active: true} %> | |
</div> |
$('#will_paginate_id').bind('click', function(event){ | |
window.scrollTo(0,0); | |
// Some code to show loader on screen | |
$('#loading').html('<div class="ui active dimmer"><div class="ui large text loader">Loading</div></div>'); | |
}); |