Skip to content

Instantly share code, notes, and snippets.


Ido Kanner ik5

  • :::1
View GitHub Profile
ik5 / html_dom_example.php
Last active Sep 9, 2020
A simple example on reading a PHP <head> tag and print it's content including attributes
View html_dom_example.php
$doc = new DOMDocument();
$doc->loadHTMLFile('test.html', LIBXML_NOWARNING | LIBXML_NOERROR);
$nodes = $doc->getElementsByTagName('head');
if ($nodes->length <= 0) {
die('no head found');
ik5 /
Created Sep 7, 2020
calc israeli id number for valid last number in python 2
#!/usr/bin/env python2
def validate_id_number(id_num):
anID = id_num.zfill(9)
return sum(
int, str(int(a)*(i % 2 + 1))

Assembly Language / Reversing / Malware Analysis -resources

Twitter: Muffin

Assembly Language

ik5 / concat-wav.go
Created Mar 8, 2020
example on concating two (or more) wav files
View concat-wav.go
package main
import (
func main() {
ik5 / audio_windows.go
Last active Oct 2, 2020
Quick and dirty audio playing for MS Windows (No error validation) in Golang
View audio_windows.go
// +build windows
package main
import (
ik5 /
Created Jan 2, 2020
shared object from go to c (re-take)
#!/usr/bin/env sh
echo "Building go library:"
go build -o -buildmode=c-shared ./main.go || exit
echo "Building C executible:"
clang --verbose -DUSE_SHARED_LLVM=on -L/tmp/so -ltest -I/tmp/so main.c -o main -Wall || exit
echo "Done"
ik5 /
Created Jul 26, 2019
Creating 10 workers, takes the host ip using docker
#!/usr/bin/env bash
declare -i min=0
declare -i max=10
host=$(ip -4 addr show docker0 | grep -Po 'inet \K[\d.]+')
for (( c=min; c<max; c++ )) do
echo "Going to start worker # $c"
docker run\
ik5 / language-layout.vue
Created Jul 22, 2019
solving layout changes in Vue.js
View language-layout.vue
<ul class="language-selector">
v-for="(language, idx) in $i18n.availableLocales"
:class="{selected: language === $i18n.locale}"
<a @click="changeLayout(language, $t(`languages.list[${idx}].bidi`))>
ik5 / custom_json_unmarshal.go
Created Jun 25, 2019
Example of custom unmarshal of JSON in golang
View custom_json_unmarshal.go
package main
import (
type To []string
ik5 / schema-bad
Created Jun 25, 2019
simple schema for blog post
View schema-bad
From - String
To - String/List of string
Message - String
You can’t perform that action at this time.