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 / 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() {
@iwat
iwat / 144ppi.md
Last active February 16, 2018 08:40
144ppi

144ppi

@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 / .gitattributes_global
Created November 10, 2017 08:08
My Git Config
*.rb diff=ruby

Machine

Overall

macOS:       Sierra 10.12.6 (16G29)
MacBook Pro: (Retina, 13-inch, Early 2015)
Processor:   2.7 GHz Intel Core i5
@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"
@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"
)

Keybase proof

I hereby claim:

  • I am iwat on github.
  • I am iwat (https://keybase.io/iwat) on keybase.
  • I have a public key ASCzLxkhqdm9V80rQZzYC129RuE5eYNXlm4H5X_1Pn4gwAo

To claim this, I am signing this object:

@iwat
iwat / fun.rb
Created April 19, 2017 04:10
Ruby shenanigans with UTF-8
# encoding: utf-8
def  (  )
  *2
end
   = 4
puts      
2016/09/09 03:00:54 [DEBUG] plugin: terraform: aws-provider (internal) 2016/09/09 03:00:54 [INFO] AWS Auth provider used: "EC2RoleProvider"
2016/09/09 03:00:54 [DEBUG] plugin: terraform: aws-provider (internal) 2016/09/09 03:00:54 [DEBUG] [aws-sdk-go] DEBUG: Request sts/GetCallerIdentity Details:
2016/09/09 03:00:54 [DEBUG] plugin: terraform: ---[ REQUEST POST-SIGN ]-----------------------------
2016/09/09 03:00:54 [DEBUG] plugin: terraform: POST / HTTP/1.1
2016/09/09 03:00:54 [DEBUG] plugin: terraform: Host: sts.amazonaws.com
2016/09/09 03:00:54 [DEBUG] plugin: terraform: User-Agent: terraform/0.7.3 aws-sdk-go/1.4.2 (go1.7; linux; amd64)
2016/09/09 03:00:54 [DEBUG] plugin: terraform: Content-Length: 43
Error refreshing state: 5 error(s) occurred: