Skip to content

Instantly share code, notes, and snippets.

@mtmtcode
mtmtcode / tomarkdown.js
Created July 2, 2012 16:27
OpenOffice selection to markdown table
importClass(Packages.com.sun.star.uno.UnoRuntime);
importClass(Packages.com.sun.star.table.XCellRange);
importClass(Packages.com.sun.star.text.XTextRange);
importClass(Packages.com.sun.star.beans.XIntrospection);
importClass(Packages.com.sun.star.frame.XModel);
importClass(Packages.com.sun.star.sheet.XCellRangeAddressable);
importClass(Packages.com.sun.star.sheet.XSpreadsheetView);
importClass(Packages.com.sun.star.datatransfer.clipboard.XClipboard);
importClass(Packages.com.sun.star.datatransfer.DataFlavor);
@mtmtcode
mtmtcode / auto-rsync.el
Last active September 2, 2022 00:30
auto-rsync.el - Emacs minor mode to execute rsync automaticlly
;;; auto-rsync-mode -- minor mode for auto rsync
;;
;; Author: @l3msh0
;;
;;; Example
;;
;; (require 'auto-rsync)
;; (auto-rsync-mode t)
;; (setq auto-rsync-dir-alist
@mtmtcode
mtmtcode / skk-xemacs.el.20130329.diff
Created March 28, 2013 17:14
fix autoload cookie
--- skk-xemacs.el.~1.100.~ 2013-03-29 02:08:10.000000000 +0900
+++ skk-xemacs.el 2013-03-29 02:08:19.000000000 +0900
@@ -39,7 +39,7 @@
(autoload 'display-pixel-height "frame")
(autoload 'display-pixel-width "frame"))
-;;;###autoload (unless (noninteractive) (require 'skk-setup))
+;;;###autoload (unless noninteractive (require 'skk-setup))
;; Variables.
@mtmtcode
mtmtcode / helm-redmine.el
Last active December 17, 2015 19:49
;;;; helm-redmine.el --- show redmine tickets with helm interface
;;;; helm-redmine.el --- show redmine tickets with helm interface
;; Copyright (C) 2013 by l3msh0
;; Author: l3msh0
;; URL: https://gist.github.com/l3msh0/5663231
;; Version: 0.0.1
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@mtmtcode
mtmtcode / naruto-ns.el
Created August 8, 2013 15:12
naruto.el (https://gist.github.com/mrkuc/6064640) を elisp-namespaces (https://github.com/chrisbarrett/elisp-namespaces) を使ってネームスペースに対応させた。
;; namespace宣言
(namespace naruto
;; useはrequireに相当
:use [dash]
;; exportで指定した変数/関数のみ(foo/bar)でアクセスできるようになる
:export [kill-naruto])
;; defでpriavteな変数宣言(mutableな変数にしたい場合はdefmutableで)
(def PI 3.1415)
(def a 0.05)
@mtmtcode
mtmtcode / Procfile
Created August 22, 2013 11:25
naruto.el Herokuデビュー
web: tar xzf emacs.tar.gz && ln -s $PWD/emacs /tmp/emacs; emacs/bin/emacs --daemon --load start-elnode.el
(require 'google-translate)
(defvar helm-multilingual-source-language "ja")
(defvar helm-multilingual-target-language-alist
'(
("Japanese" . "ja")
("Arabic" . "ar")
("Chinese Simplified" . "zh-CN")
("Dutch" . "nl")
("English" . "en")
@mtmtcode
mtmtcode / gist:8349988
Created January 10, 2014 10:47
現在のタブで開いているRedmineチケットの番号,タイトル,URLをコピー
js <<EOS
commands.addUserCommand(
['tcopy'], 'Copy ticket number and subject',
function() {
var matches = document.title.match(/#([0-9]+): ([^ ]+)/);
var num = matches[1];
var subject = matches[2];
var copiedStr = '#'+num+' '+subject;
util.copyToClipboard(copiedStr+"\n"+content.location);
@mtmtcode
mtmtcode / rec_radiko.sh
Created January 26, 2016 22:54 — forked from saiten/rec_radiko.sh
簡易radiko録音ツール。要swftools
#!/bin/sh
playerurl=http://radiko.jp/player/swf/player_4.1.0.00.swf
cookiefile=./cookie.txt
playerfile=./player.swf
keyfile=./authkey.png
if [ $# -eq 1 ]; then
channel=$1
output=./$1.flv
(ql:quickload :swank)
(defun main ()
(setq swank::*loopback-interface* "0.0.0.0")
(swank:create-server :port 4005 :style :spawn :dont-close t)
(loop (sleep 60)))
(main)