Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
####
#
# peco-awslogs
#
# awslogs getのラッパー。
# AWSのロググループをpecoで絞って取得する。
#
# original: https://qiita.com/hiroga/items/2a9a4673f60aca7cc48f
@mtmtcode
mtmtcode / Code.ts
Created April 2, 2020 07:24
テレビを起動してNHKをつけるやつ
function doGet() {
const token = PropertiesService.getScriptProperties().getProperty("REMO_API_TOKEN");
if (!token) {
throw new Error('REMO_API_TOKEN must be set as script property');
}
Logger.log("=== begin ===");
postTv(token, "power"); // 電源ON
sleep(20000);
(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)
@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
@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);
(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 / 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
@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 / 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 / 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.