Skip to content

Instantly share code, notes, and snippets.

#### Issue description
#### Steps to reproduce the issue
1.
2.
3.
# List running nodes
docker run -it --rm --volumes-from data levenson/kubectl get nodes
NAME LABELS STATUS
10.161.34.62 kubernetes.io/hostname=10.161.34.62 Ready
10.161.34.65 kubernetes.io/hostname=10.161.34.65 Ready
10.161.34.70 kubernetes.io/hostname=10.161.34.70 Ready
# Label nodes with name key
docker run -it --rm --volumes-from data levenson/kubectl label nodes 10.161.34.62 name=node-1
@yurifrl
yurifrl / gist:9e3a6dbc1c6f57f8f669fabf98a80e9b
Created June 30, 2016 02:06 — forked from unnitallman/gist:944011
sqlite with activerecord outside rails
require 'active_record'
ActiveRecord::Base.logger = Logger.new(STDERR)
ActiveRecord::Base.colorize_logging = false
ActiveRecord::Base.establish_connection(
:adapter => "sqlite3",
:dbfile => ":memory:"
)
@yurifrl
yurifrl / NERDTree.mkd
Created November 27, 2015 16:30 — forked from m3nd3s/NERDTree.mkd
My Vim Cheat Sheet

NERDTree

o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|

O.......Recursively open the selected directory..................|NERDTree-O|

@yurifrl
yurifrl / ember_examples.md
Created November 3, 2015 16:01 — forked from rwjblue/ember_examples.md
Ember Examples
@yurifrl
yurifrl / gist:edd4d825b67eb91d350d
Last active August 29, 2015 14:27 — forked from waitingallday/gist:1851354
Kaminari on find_by_sql
sql = "…"
Kaminari.paginate_array(Product.find_by_sql(sql)).page(params[:page]).per(20)
@yurifrl
yurifrl / about.md
Last active August 29, 2015 14:26 — forked from tiagoamaro/about.md
searchkick-apartment-example-codes

Products

index of products 25 first

curl -i -H "X-Spree-Token: YOUR_TOKEN_ID" http://0.0.0.0:3000/api/products.json

Show a product

curl -i -H "X-Spree-Token: YOUR_TOKEN_ID" http://0.0.0.0:3000/api/products/706676762.json

Modify a product

curl -i -X PUT -H "X-Spree-Token: YOUR_TOKEN_ID" -d "product[name]=Headphones" http://0.0.0.0:3000/api/products/706676762.json

// config/environment.js
// This is not for production. But it will get your
// console to stop screaming errors if your messing
// around with ember cli
module.exports = function(environment) {
//lots of stuff
// <Add this chunk>
// It is important to declare your variables.
(function() {
var foo = 'Hello, world!';
print(foo); //=> Hello, world!
})();
// Because if you don't, the become global variables.
(function() {