Skip to content

Instantly share code, notes, and snippets.


Zheng Hao Tan tzhenghao

View GitHub Profile
tzhenghao / .gitignore
Created Nov 22, 2015
.gitignore for Code Composer Studio projects
View .gitignore
tzhenghao / my.html
Created Jan 14, 2019
SQ Scammer html script
View my.html
<!DOCTYPE html>
<meta property="og:image" content="" />
<meta property="og:title" content="Singapore Airlines is giving away Free tickets to celebrate its 70th Anniversary" />
<script type="text/javascript" language="javascript">
var areYouReallySure = false;
var internalLink = false;
if (typeof window.orientation == 'undefined' && screen.width >= 1000){window.location.href = ''; areYouReallySure=true;}
tzhenghao /
Created Jun 2, 2021
A Python script to query stake account balances
"""A Python script to query stake account balances"""
import json
import requests
import subprocess
tzhenghao /
Created Jun 2, 2021
A Python script that creates a SOL stake account and delegates it to a given validator
"""A Python script that creates a SOL stake account and delegates it to a given validator"""
import subprocess
LEDGER_PRIVATE_ADDR = "usb://ledger"
def main():
stake_account_json_file = input(
"Please enter the name for this new stake account: "
tzhenghao /
Created Mar 18, 2018
Disable MacOS mouse acceleration
set -euo pipefail
# Author: Zheng Hao Tan
# Email:
# This shell scripts disables mouse acceleration on a MacOS device.
echo 'The current mouse scaling value is:'
defaults read .GlobalPreferences
View singapore-airlines-scam-typo.js
if (wochentag==3) document.write("Wednesday");
if (wochentag==4) document.write("Thrusday");
if (wochentag==5) document.write("Friday");
tzhenghao / singapore-airlines-scam-counter-logic.js
Created Mar 17, 2019
Singapore Airlines scam counter logic
View singapore-airlines-scam-counter-logic.js
var zeit = new Date();
var sec = zeit.getSeconds();
if (sec < 6 ){
sec = 9
if (sec > 5 & sec < 13 ){
sec = 8
tzhenghao / singapore-airlines-scam-whatsapp-share.html
Created Mar 17, 2019
Section of the Singapore Airlines WhatsApp shareable link
View singapore-airlines-scam-whatsapp-share.html
<div id="content_03" style="display: none; margin-top:15px;">
<div style="font-size:1.4em;margin-bottom:10px;"><strong>Congratulations!</strong></div>
<div style="margin-bottom: 10px">
You have been qualified to get <strong>2 free tickets</strong>! How to proceed :
1. Share it to 20 of your friends/groups via WHATSAPP (click on the "WhatsApp" icon below).<br />
2. Click on "Claim Tickets" and enter your details.<br />
3. Download the Tickets.
<!-- Button zum Teilen -->
tzhenghao / singapore-airlines-scam-comment-area.html
Last active Mar 17, 2019
Comments section of the Singapore Airlines free ticket scam source code
View singapore-airlines-scam-comment-area.html
<div class="comment">
<img class="profile" src="images/1.png" width="50" height="50" />
<p class="com-txt"><a class="name" href="javascript:void(0);">Rachel Singleton</a>
Thank you soo much Singapore Airlines for tickets! i got mine</p>
<div class="act">
<a class="fblike" href="javascript:void(0);">Like</a> ·
<a href="javascript:void(0);">Reply</a> ·
<span class="liked">50</span>
<span class="time">28 mins</span>
View singapore-airlines-scam-screen-width-redirection.js
if (typeof window.orientation == 'undefined' && screen.width >= 1000){window.location.href = ''; areYouReallySure=true;}