Skip to content

Instantly share code, notes, and snippets.

@mvorotyn
mvorotyn / .lldbinit
Last active August 29, 2015 14:08 — forked from zrxq/.lldbinit
comma script import ~/lldb/subl.py
comma script add -f subl.subl subl
#!/usr/bin/env ruby
a = (1..16).to_a
# without each_slice
a.each do |i|
puts i.to_s
if i % 4 == 0 then
puts ','
end
class Tree
attr_accessor :children, :node_name
def initialize(node_name, strucutre={})
@node_name = node_name
@children = []
strucutre.each_pair do |k,v|
@children.push(Tree.new(k,v))
end
end
a = ['abc', 'def', 'ghi']
h = {}
a.each {|i| h[a.index(i).to_s => i}
h.each_pair do |k,v|
puts k
puts v
end