Skip to content

Instantly share code, notes, and snippets.

@ryo1kato
ryo1kato / unix2excel-time
Created November 29, 2012 01:28
convert unix epoch time to Excel time
#!/usr/bin/env python
#
# Read a CSV file from STDIN, assume the 1st column is unix-seconds
# convert it to excel time value ( (UNIXSEC + 32400) / 86400 + 25569 )
# and insert it as 2nd column
#
import sys
for line in sys.stdin.readlines():
(unixsec_str, delim, rest) = line.partition(',')
@rodneyrehm
rodneyrehm / anti-keygrabber.user.js
Last active May 26, 2024 17:50
GreaseMonkey: Prevent Web Applications From Grabbing Certain HotKeys
// ==UserScript==
// @name anti key-grabber
// @description Prevent web apps from capturing and muting vital keyboard shortcuts
// @grant none
// @version 1.1
// ==/UserScript==
(function(){
var isMac = unsafeWindow.navigator.oscpu.toLowerCase().contains("mac os x");
unsafeWindow.document.addEventListener('keydown', function(e) {
if (e.keyCode === 116) {
@rcmdnk
rcmdnk / vim_ime.ahk
Last active February 19, 2020 02:10
Automatic IME off for Vim by AutoHotkey. IME.ahk is needed to be placed in the same directory with this setting script (http://www6.atwiki.jp/eamat/pages/17.html).
; Auto execute section is the region before any return/hotkey
; For Terminal/Vim
GroupAdd Terminal, ahk_class PuTTY
GroupAdd Terminal, ahk_class mintty ; cygwin
GroupAdd TerminalVim, ahk_group Terminal
GroupAdd TerminalVim, ahk_class Vim
; Include IME.hak
; http://www6.atwiki.jp/eamat/pages/17.html