Skip to content

Instantly share code, notes, and snippets.

View owyongsk's full-sized avatar

SoonKhen OwYong owyongsk

View GitHub Profile
@owyongsk
owyongsk / cf_chameleon.js
Last active November 22, 2022 03:28
A quick way to have Dropbox Public Folder for free using Cloudflare Workers! Inspired by https://github.com/owyongsk/chameleon.
/***
1. Create an app on your https://www.dropbox.com/developers/apps/create, choose "Dropbox API",
set permissions to "Apps folder", generate a token Refresh until image loads
2. Deploy this code to Cloudflare Workers.
3. Set your token as env variable DROPBOX_TOKEN in Cloudflare worker
4. Move all your files to your ~/Dropbox/Apps/'dropbox-app-name-earlier' folder
5. Look at your file at https://example.com/path/to/file.html if you have a
file ~/Dropbox/Apps/'dropbox-app-name-earlier'/path/to/file.html
@owyongsk
owyongsk / uob.js
Last active October 19, 2020 09:12
Automatically add transactions to klse.i3investor.com
//******
//*
//* 1. Change the text below by pasting each line from the email you receive
//* 2. Then open the console, and copy and paste the whole file and press enter
//*
//******
text = `
Order matched – Bought 30000 units of MTAG (0213) at RM 0.580000 on (2020-07-30 12:12:38). Login to UTRADE for more information.
Order matched – Bought 13000 units of HEXZA (3298) at RM 1.330000 on (2020-07-30 12:14:27). Login to UTRADE for more information.
@owyongsk
owyongsk / redirect.py
Created November 21, 2019 09:18
Prank Redirect
import SimpleHTTPServer
import SocketServer
import random
from urlparse import urlparse, parse_qs
class Redirect(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
term = parse_qs(urlparse(self.path).query)['q'][0]
self.send_response(302)
@owyongsk
owyongsk / google_form_webhook.gs
Last active June 6, 2018 04:35
A Google Form which sends all the data, including attachment to a URL of your choice via webhooks.
/*
* Inspired by https://gist.github.com/lifehome/db101c66fe547a8ffbffe10d1bc0b426
*
* Please keep the source code updated with this gist at
* https://gist.github.com/owyongsk/cf36ae0dc9fdb743ae70cb39fe164f8d
*
* There's no way to have a gist owned by an organization
*/
var webhook_url = "https://your.own/webhook/path";
@owyongsk
owyongsk / install_ex.sh
Last active June 26, 2016 08:03 — forked from jimsynz/install_ex.sh
I use this to install Elixir on Codeship.
#!/bin/sh
# I use this to install Elixir on our codeship instances for testing. YMMV.
#
# cd ~
# curl -O https://gist.githubusercontent.com/jamesotron/44f8962cddef781ab830/raw/e75599e95587cbca26e707505fd40dd0f26eb0f5/install_ex.sh
# . ~/install_ex.sh
# cd ~/clone
# You can override your Elixir and Erlang versions from your shell when you call ./install_ex.sh.