Skip to content

Instantly share code, notes, and snippets.

View mhayashi1120's full-sized avatar

Masahiro Hayashi mhayashi1120

View GitHub Profile
@mhayashi1120
mhayashi1120 / anonymous-gist.txt
Created March 19, 2014 00:58
error log 20140319
一番最初のエラーは一週間前の gosh に関係するみたいなのですけど
Mar 12 15:39:39 zeus kernel: [204006.465570] gosh: page allocation failure: order:1, mode:0x20
Mar 12 15:39:39 zeus kernel: [204006.465578] Pid: 3135, comm: gosh Not tainted 3.2.0-4-amd64 #1 Debian 3.2.54-2
Mar 12 15:39:39 zeus kernel: [204006.465581] Call Trace:
Mar 12 15:39:39 zeus kernel: [204006.465584] <IRQ> [<ffffffff810b8f30>] ? warn_alloc_failed+0x11f/0x134
Mar 12 15:39:39 zeus kernel: [204006.465599] [<ffffffff810bbc60>] ? __alloc_pages_nodemask+0x704/0x7aa
Mar 12 15:39:39 zeus kernel: [204006.465606] [<ffffffff810eb115>] ? kmem_getpages+0x4c/0xd9
Mar 12 15:39:39 zeus kernel: [204006.465610] [<ffffffff810ec4c6>] ? fallback_alloc+0x13e/0x1e2
Mar 12 15:39:39 zeus kernel: [204006.465617] [<ffffffff8134fdc7>] ? _raw_spin_unlock_irqrestore+0xe/0xf
@mhayashi1120
mhayashi1120 / exam-gosh2
Last active August 29, 2015 13:58
gosh memory exhaustion
#!/usr/bin/env /usr/local/gauche-current/bin/gosh
(debug-print-width #f)
(use gauche.uvector)
(use gauche.sequence)
(use gauche.threads)
(use rfc.json)
(use parser.peg)
@mhayashi1120
mhayashi1120 / nlet.el
Last active August 29, 2015 14:10
named-let
(defmacro nlet (name varlist &rest body)
"Named-LET for elisp. Create function dynamic bind as NAME.
DO NOT use primitive name of elisp function as NAME.
Example:
\(nlet next ((a 0)
(res '()))
(if (< a 3)
(next (1+ a) (cons (* a 2) res))
(nreverse res)))
@mhayashi1120
mhayashi1120 / gdic.el
Last active September 23, 2015 15:28
Google dictionary for japanese
;;; -*- coding: utf-8; -*-
;;; gdic.el --- Google translator for Japanese
;; Author: Masahiro Hayashi <mhayashi1120@gmail.com>
;; URL: http://gist.github.com/575981
;; Keywords: google translation
;; Emacs: GNU Emacs 24 or later
;; Package-Requires: ((cl-lib "0.3"))
;; Version: 0.2.0
@mhayashi1120
mhayashi1120 / fgit.el
Created October 21, 2010 13:01
my git interface
;;; fgit.el --- Functional Git interface for emacs
;; Copyright (C) 2010 by Hayashi Masahiro
;; Author: Hayashi Masahiro <mhayashi1120@gmail.com>
;; URL:
;; Keywords: Emacs, Git, Frontend
;; Version: 0.0.1
;; fgit.el is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
@mhayashi1120
mhayashi1120 / twittering+tab.el
Last active September 25, 2015 11:57
twittering-mode tab extension
;; Author: Masahiro Hayashi <mhayashi1120@gmail.com>
;; Keywords:
;; Emacs:
;; Package-Requires: ()
;; * require imagemagick to display icon
;;TODO
;; * show unseen count or only unseen existence.
@mhayashi1120
mhayashi1120 / jcalendar-test.el
Created June 18, 2011 11:14
Calendar extension for japanese
(require 'ert)
(require 'jcalendar)
(ert-deftest jcalendar-era ()
""
:tags '(jcalendar)
(should (equal (car (jcalendar--date-to-era '(1 6 1989))) "昭和"))
(should (equal (car (jcalendar--date-to-era '(1 7 1989))) "昭和"))
(should (equal (car (jcalendar--date-to-era '(1 8 1989))) "平成"))
(should (equal (car (jcalendar--date-to-era '(1 25 1868))) "明治"))
@mhayashi1120
mhayashi1120 / nativechecker.el
Created July 13, 2011 16:35
English checker for Japanese
;;; Install:
;; Put this file into load-path'ed directory, and byte compile it if
;; desired. And put the following expression into your ~/.emacs.
;;
;; (require 'nativechecker)
;;; Usage:
@mhayashi1120
mhayashi1120 / twittering-hashtag.patch
Created July 30, 2011 16:27
twittering-hashtag-patch
diff --git a/twittering-mode.el b/twittering-mode.el
index 91e0156..b1301ec 100644
--- a/twittering-mode.el
+++ b/twittering-mode.el
@@ -3384,6 +3384,9 @@ Before calling this, you have to configure `twittering-bitly-login' and
;; Unicode Character 'FULLWIDTH COMMERCIAL AT' (U+FF20)
(concat "\\(?:@\\|" (char-to-string full-width-commercial-at) "\\)")))
+(defvar twittering-regexp-hashtag-words
+ "\\(\\(?:\\w\\|[_-]\\)+\\)")
diff --git a/twittering-mode.el b/twittering-mode.el
index 91e0156..c7bb4fe 100644
--- a/twittering-mode.el
+++ b/twittering-mode.el
@@ -515,6 +515,8 @@ StatusNet Service.")
(search-url . twittering-get-search-url-statusnet)))
"A list of alist of service methods.")
+(defvar twittering-favorites-timeline-page nil)
+