Skip to content

Instantly share code, notes, and snippets.

$ make html
sphinx-build -b html -d build/doctrees source build/html
Usage: sphinx-build [OPTIONS] SOURCEFILE ...
sphinx-build: error: no such option: -b
make: *** [html] Error 2
@kiwanami
kiwanami / extension.js
Last active December 26, 2015 08:19
InputSourceを素早く切り替えたり、特定のウインドウでは何もしないような gnome-shell extension。以前のよくあるIMの動作を再現する。gnome-shell-extension-tool -c で作って、xmlはschemasディレクトリを作ってglib-compile-schemas schemasとかでコンパイルする感じで。
// -*- coding: utf-8; -*-
// for gnome-shell 3.16.2
const Gio = imports.gi.Gio;
const Shell = imports.gi.Shell;
const Meta = imports.gi.Meta;
const St = imports.gi.St;
const Main = imports.ui.main;
const ExtensionUtils = imports.misc.extensionUtils;
@kiwanami
kiwanami / backlog_wiki_crawler.rb
Created August 20, 2013 04:14
Backlog Wiki crawler
#!/usr/bin/ruby
#-*- coding: utf-8; -*-
require "pp"
require "mechanize"
STDOUT.sync = true
# config
@kiwanami
kiwanami / ctable-0.1.2b-demo.el
Last active December 17, 2016 04:28
ctable-0.1.2b.el and demo.
;;; An asynchronous data model sample for ctable.el
(require 'ctable)
(require 'deferred)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; synchronous version
(defun ctbl:sync-demo1 ()
@kiwanami
kiwanami / tern-project-dialog.el
Last active December 17, 2016 04:28
tern-project-dialog.el
;;; tern-dialog.el ---
;; Author: SAKURAI Masashi <m.sakurai at kiwanami.net>
;; Version: 0.0.2
;; Package-Requires: ((tern "0.0.1") (widget-mvc "24"))
;;; Commentary:
;; M-x tern-prjfix-make
;;
@kiwanami
kiwanami / direx-ctable.el
Created February 19, 2013 05:26
direx-ctable.el
;;; direx-ctable.el --- direx table extension
;; Copyright (C) 2013 SAKURAI Masashi
;; Author: SAKURAI Masashi <m.sakurai at kiwanami.net>
;; Keywords: dired, ctable
;; 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
;; the Free Software Foundation, either version 3 of the License, or
@kiwanami
kiwanami / gridfs-proxy-test.rb
Created October 23, 2012 01:27
gridfs-proxyのrspecによるテスト
# -*- coding: utf-8 -*-
require 'mongo'
require 'stringio'
MONGO_PORT = 28017
HTTP_PORT = 5001
$mongodb = nil
@kiwanami
kiwanami / gridfs-proxy.js
Created October 22, 2012 15:38
http proxy for gridfs (node.js)
// -*- coding: utf-8; -*-
var http = require('http');
var Deferred = require('jsdeferred').Deferred;
var mongo = require('mongodb');
var config;
(function() {
var cmdArguments = process.argv.splice(2);
@kiwanami
kiwanami / gridfs-proxy.pl
Created October 22, 2012 15:37
http proxy for gridfs (psgi)
use MongoDB::Async;
use Coro;
use Coro::EV;
use MongoDB::Async::GridFS;
use Data::Dumper;
use POSIX qw(:math_h);
# (setenv "PERL5LIB" "./exlib/lib/perl5/x86_64-linux:./exlib/lib/perl5")
my $connection = MongoDB::Async::Connection->new(host => 'localhost', port => 27017);
@kiwanami
kiwanami / ruby-mode-imenu-customize.el
Created August 8, 2012 02:49
ruby-mode-imenu-customize.el
;; for Emacs 23.4 ruby-mode
(eval-after-load "ruby-mode"
'(progn
(defun ruby-imenu-create-index-in-block (prefix beg end)
(let ((index-alist '()) (case-fold-search nil)
name next pos decl sing)
(goto-char beg)
(while (re-search-forward "^\\s *\\(\\(class\\s +\\|\\(class\\s *<<\\s *\\)\\|module\\s +\\)\\([^\(<\n ]+\\)\\|\\(def\\|alias\\|get\\|post\\|describe\\|context\\)\\s +\\([^\(\n]+\\)\\)" end t)
(setq sing (match-beginning 3))