Skip to content

Instantly share code, notes, and snippets.

@asserchiu
asserchiu / index.html
Created October 20, 2014 08:02
Weekly distribution in block styled visualization.
<!--
House Hunter By Day, Not So Much After Midnight - Trulia TrendsTrulia Trends
http://www.trulia.com/trends/2011/09/house-hunter-by-day-not-so-much-after-midnight/
House Hunting All Day, Every Day - Trulia Insights
http://www.trulia.com/vis/tru247/
-->
<script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.11/d3.min.js"></script>
@asserchiu
asserchiu / fillZero.py
Last active August 29, 2015 14:14
Zero fill all files ends with .secrete using python3
#!/usr/bin/env python
# Tested in:
# Windows 8.1 Enterprise, en_US
# Python 3.4.2 (v3.4.2:ab2c023a9432, Oct 6 2014, 22:15:05)
# [MSC v.1600 32 bit (Intel)] on win32
import os
import sys
@asserchiu
asserchiu / Telegram.desktop
Created February 25, 2015 14:42
Telegram Web in `webapp-container`. Tested in Ubuntu Trusty. Change the *Icon* to your own icon path. It is recommanded to place this file at `/usr/share/applications/`(for all users) or at `~/.local/share/applications/`(for current user).
[Desktop Entry]
Name=Telegram Web
Comment=Telegram Web in `webapp-container`
Type=Application
Icon=/path/to/Telegram.png
Exec=webapp-container --store-session-cookies --webappUrlPatterns=https?://web.telegram.org/* https://web.telegram.org/ %u
Terminal=false
Categories=Network;
@asserchiu
asserchiu / gist:73e577a739529d7ba53d
Last active November 27, 2018 02:34
Bookmarklets
// GoTo: Canonical URL of current page
javascript:(function(){document.location=document.querySelector("link[rel='canonical']").href;})();
// GoTo: Amazon ASIN URL (minimal URL for items)
javascript:(function(){document.location=document.location.origin+'/dp/'+document.getElementById('ASIN').value;})();
// Get: QR Code of current page
javascript:(function(){document.location="http://chart.apis.google.com/chart?chs=256x256&cht=qr&chld=|1&chl="+encodeURIComponent(document.location);})();
// Enable and Disable document design mode
@asserchiu
asserchiu / score_a_word.py
Created May 21, 2015 10:08
Score a word with a: 1, b: 2, ..., z: 26.
#!/usr/bin/python
# -*- coding: utf-8 -*-
def score_a_word(word=''):
# TODO: add exception!
sum = 0
for char in word.lower():
sum += (ord(char) - 96)
print(word + ' for ' + str(sum))
@asserchiu
asserchiu / affirmation
Created May 22, 2015 18:45
MuleSoft Contributor Agreement Acceptance by Asser Chiu
I, Asser Chiu, have read and do accept the MuleSoft Contributor Agreement
at http://www.mulesoft.org/legal/contributor-agreement.html
Accepted on Sat May 23 2015 02:45:05 GMT+0800 (Taipei Standard Time)