Skip to content

Instantly share code, notes, and snippets.

@bamanzi
bamanzi / gist:3121820
Created July 16, 2012 09:32
Extract notes' title & url from Evernote exported file (*.enex)
from lxml import etree
def enex_list_notes_info(enex_file_name):
f = file(enex_file_name, "r")
enex = etree.parse(f)
notes = enex.xpath("//note")
for note in notes:
title = url = ""
etitle = note.xpath("title")
@bamanzi
bamanzi / tango-theme.properties
Created June 15, 2012 09:51
Tango theme for SciTE
[general]
color.butter-1=#fce94f
color.butter-2=#edd400
color.butter-3=#c4a000
color.orange-1=#fcaf3e
color.orange-2=#f57900
color.orange-3=#ce5c00
color.choc-1=#e9b96e
color.choc-2=#c17d11
color.choc-3=#8f5902
@bamanzi
bamanzi / tc-tango.ini
Created June 15, 2012 09:50
Tango theme for Total Commander
[COLORS]
BackColor=3421230
ForeColor=12500670
MarkColor=9125192
CursorColor=5237247
BackColor2=1973790
InverseCursor=0
CursorText=-1
InverseSelection=1
@bamanzi
bamanzi / firefox-prefs.js.md
Last active May 19, 2023 09:34
Firefox preference tweaks
@bamanzi
bamanzi / ediff.py
Created June 13, 2012 01:47
[emacs] ediff command line launcher
#!/usr/bin/python
# on windows, you can use cx-freeze to make an exe for this
import os
import os.path
import sys
if len(sys.argv)<3:
sys.stderr.write("Usage: ediff file1 file2")
else:
@bamanzi
bamanzi / chroot.sh
Last active May 16, 2018 19:56
chroot wrapper
NEWROOT=`dirname $(readlink -f $0)`
read -n1 -p "chroot to $NEWROOT? (y/n) :" ack
[ foo"$ack" == fooy ] || exit -1
echo " "
function mount_if_not() {
dir=$1
mount | grep $NEWROOT$dir >/dev/null
key.setGlobalKey(['C-x', '0'], function (ev, arg) {
SplitBrowser.activeBrowserCloseWindow();
}, '現在のフレームを閉じる');
key.setGlobalKey(['C-x', '1'], function (ev, arg) {
var url = SplitBrowser.activeBrowser != gBrowser ? SplitBrowser.activeSubBrowser.src : null;
var browsers = SplitBrowser.browsers;
for (var i = 0; i < browsers.length; ++i)
browsers[i].close();
@bamanzi
bamanzi / keysnail-sidebar.js
Created April 22, 2012 02:04
[keysnail] Load current URL in sidebar
ext.add("view-in-sidebar", function() {
toggleSidebar('', false);
var sidebarcmd = document.getElementById('viewURISidebar');
//print(sidebarcmd.getAttribute("sidebarurl"))
//print(sidebarcmd.getAttribute("checked"))
sidebarcmd.removeAttribute("checked");
sidebarcmd.setAttribute("sidebarurl", content.location.href);
sidebarcmd.setAttribute("sidebartitle", content.document.title);
@bamanzi
bamanzi / tabundle-group.js
Created April 22, 2012 02:02
[firefox] let `tabbundle' only snapshot tabs in current group
// let `tabbundle' only snapshot tabs in current group
// put these code into:
// extensions\[email protected]\chrome\content\tabundle.js
Tabundle.bundle = function() {
Tabundle.createIndexHtml()
//var path = Tabundle.createListHtml()
var path = Tabundle.createGroupListHtml();
if (path) {
@bamanzi
bamanzi / jasspa.emf
Created April 22, 2012 01:59
my jasspa.emf
global-bind-key beginning-of-line "home"
global-bind-key end-of-line "end"
;!force exec-file "msshift"
set-variable %cygwin-path "e:/cygwin2"
;!force exec-file "win32"
set-variable $INFOPATH &cat %cygwin-path "/usr/share/info"
;; Emacs-like imenu