Skip to content

Instantly share code, notes, and snippets.

@fabrizim
fabrizim / iframe.js
Last active April 12, 2024 14:33
Javascript for updating iframe height with postMessage
(function(){
function post_height(){
var msg = JSON.stringify({event:'size', height: document.body.scrollHeight});
window.top.postMessage(msg, '*');
}
var onload = window.onload;
window.onload = function(){
if( onload && typeof onload =='function'){
@mengzhuo
mengzhuo / bigben.py
Last active December 17, 2015 07:39
# -*- coding: utf-8 -*-s
'''
File: bigben.py
Author: Meng Zhuo <[email protected]>
Description: 大笨钟
'''
import time
import logging
import threading
from datetime import datetime