Skip to content

Instantly share code, notes, and snippets.

Ido Kanner ik5

  • :::1
Block or report user

Report or block ik5

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:


start new with session name:

tmux new -s myname
ik5 / int_to_ip.rb
Created Jun 5, 2019
short script to convert 32 bit integer to IPv4
View int_to_ip.rb
#!/usr/bin/env ruby
require 'ipaddr'
ARGV.each do |int|
puts "#{int} = #{, Socket::AF_INET).to_s}"


  • C-a == Ctrl-a
  • M-a == Alt-a


:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
ik5 / interfaces.go
Created Mar 26, 2019
list all ethernet interfaces and its data including mtu, state etc...
View interfaces.go
package main
import (
func main() {
ifaces, err := net.Interfaces()
for _, iface := range ifaces {
ik5 / gist:6e383127ef12b5eb1281df3948d6458f
Created Mar 12, 2019 — forked from milosgajdos83/gist:296fb90d076f259a5b0a
Add a MAC VLAN interfaces into Docker from the host machine
View gist:6e383127ef12b5eb1281df3948d6458f
package main
import (
ik5 / gist:5ae5a706397b0f4e90df1101b2494f6f
Created Mar 12, 2019 — forked from milosgajdos83/gist:9f68b1818dca886e9ae8
Add a VLAN interfaces into Docker from the host machine
View gist:5ae5a706397b0f4e90df1101b2494f6f
package main
import (
ik5 / config
Created Feb 8, 2019
my ~/.ssh/config
View config
Host *
ControlPath ~/.ssh/sockets/master-%l-%r@%h:%p
ControlMaster auto
ServerAliveInterval 25
Compression yes
IdentityFile ~/.ssh/id_rsa
#ControlPersist yes
UseRoaming no
ik5 / checksum.go
Created Jan 27, 2019
example of using golang's sha512 for checksum
View checksum.go
package main
import (
// CalcChecksum takes a slice of bytes and calculate it as a checksum
// it is using SHA512 for that (128 bytes for result)
func CalcChecksum(buff []byte) []byte {
ik5 / peek.go
Created Jan 8, 2019
How to reuse stream in golang
View peek.go
package utils
import (
// PeekReadCloser return a copy of a reader without loosing the original content
ik5 / wav_duration.go
Created Nov 21, 2018
fast example to see if a wav duration is a minute or more
View wav_duration.go
package main
import (
You can’t perform that action at this time.