Skip to content

Instantly share code, notes, and snippets.

View iwat's full-sized avatar
:octocat:
Having fun

Chaiwat S iwat

:octocat:
Having fun
  • Vancouver, BC
View GitHub Profile
@iwat
iwat / main.go
Created August 8, 2017 07:04
Luhn Generator
// Given a first 6 digits and last 4 digits.
// It will generate full 16-digit PANs that satisfy Luhn algorithm.
package main
import (
"flag"
"fmt"
"strconv"
"strings"
)
@iwat
iwat / main.go
Last active August 8, 2017 07:10
Find hash collision for limited data/hash size.
// Result, using input string from 0 to 999999.
// It finds some conflict if the hash size is 4 bytes,
// no conflict found if hash size is 6 bytes.
package main
import (
"crypto/hmac"
"crypto/sha256"
"encoding/hex"
"fmt"

Machine

Overall

macOS:       Sierra 10.12.6 (16G29)
MacBook Pro: (Retina, 13-inch, Early 2015)
Processor:   2.7 GHz Intel Core i5
@iwat
iwat / .gitattributes_global
Created November 10, 2017 08:08
My Git Config
*.rb diff=ruby
@iwat
iwat / VirtualBox_Uninstall.tool
Created December 4, 2017 07:41
Uninstall VirtualBox
#!/bin/bash
# $Id: VirtualBox_Uninstall.tool 101252 2015-06-24 13:07:35Z bird $
## @file
# VirtualBox Uninstaller Script.
#
#
# Copyright (C) 2007-2015 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
@iwat
iwat / 144ppi.md
Last active February 16, 2018 08:40
144ppi

144ppi

@iwat
iwat / gist:93629f67604dc3fd59f6b8bc23accd9b
Created February 13, 2021 05:17
TradingView - Remove ads
// ==UserScript==
// @name TradingView - Remove ads
// @version 0.1
// @description Does what it says.
// @author Chaiwat
// @include https://www.tradingview.com/chart/*
// @grant none
// ==/UserScript==
(function() {