I hereby claim:
- I am doon on github.
- I am doon (https://keybase.io/doon) on keybase.
- I have a public key ASDk4h8-z6zz9760y8VtiUf3X3ukzbLhZsiDi6NFHtNN_Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
unless File.exist?('Gemfile') | |
File.write('Gemfile', <<-GEMFILE) | |
source 'https://rubygems.org' | |
gem 'rails', '4.1.2rc1' | |
gem 'pg' | |
GEMFILE | |
system 'bundle' |
I hereby claim:
To claim this, I am signing this object:
There was an old lady called Wright | |
who could travel much faster than light. | |
She departed one day | |
in a relative way | |
and returned on the previous night. |
<?php | |
$vlans = '00 00 00 00 00 00 00 00 00 00 00 80 04 00 00 00'; | |
$v = explode(' ',$vlans); | |
foreach ($v as $idx=>$o){ | |
if ($o == '00'){ | |
next; | |
}else{ | |
$base = $idx * 8; | |
$mask = str_split(str_pad(base_convert($o,16,2),8,'0',STR_PAD_LEFT)); |
#!/usr/bin/env ruby | |
vlans = '00 00 00 00 00 00 00 00 00 00 00 80 04 00 00 00' | |
vlans.split.each_with_index do |o,idx| | |
next if o == '00' | |
base = 8 * idx | |
mask = sprintf('%08b',o.to_i(16)) | |
mask.split("").each_with_index do |x,i| | |
next if x == '0' | |
puts base + (i.to_i) |