This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defvar fringe-indicator-ol nil) | |
(defun fringe-indicator (pt bitmap) | |
(let ((s (make-string 1 ?x))) | |
(when fringe-indicator-ol (delete-overlay fringe-indicator-ol)) | |
(setq fringe-indicator-ol (make-overlay pt (1+ pt))) | |
(put-text-property 0 1 'display (list 'left-fringe bitmap) s) | |
(overlay-put fringe-indicator-ol 'before-string s))) | |
(defadvice set-mark-command (after fringe-indicator-adv activate) | |
"indicate mark-position at fringe." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; -*- coding: utf-8-unix -*- | |
;; (defconst my-time-zero (current-time)) ;; for my-time-lag in discrete.el | |
;;;; | |
;;;; Filename: .emacs | |
;;;; Last modified: Mon Oct 22 2012 18:21:38 JST | |
;;;; | |
;;;; based: $Id: .emacs,v 1.26 2006/02/16 06:44:23 gnrr Exp gnrr $ | |
;;;; | |
;;;; note: update --> M-x eval-current-buffer | |
;;;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;;; -*- mode: lisp-interaction; syntax: elisp; coding: iso-2022-7bit -*- | |
;;;; | |
;;;; discrete elisp | |
;;;; | |
;;;; Filename: discrete.el | |
;;;; Last modified: Mon Oct 22 2012 18:15:05 JST | |
;;;; | |
;;;; based: $Id: discrete.el,v 1.51 2006/02/16 05:13:34 gnrr Exp gnrr $ | |
;;;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Filename: .bash_profile | |
# Last modified: Mon Oct 22 2012 19:09:23 JST | |
# | |
# note: for mac | |
if [ -f ~/.bashrc ] ; then | |
. ~/.bashrc | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Filename: .bashrc | |
# Last modified: Mon Oct 22 2012 19:09:34 JST | |
# | |
# note: require ~/.bash_profile on mac | |
# | |
export PS1="\[\e[35;1m\]\u@\[\e[34;1m\]\h\e[0m:\[\e[0m\]\e[32;1m\w\e[0m $" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# mkramdisk.sh : prepare ramdisk for mac | |
# | |
# install: | |
# 1. modify variables (caches, mb) as your like, in this script. | |
# | |
# 2. register to startup: | |
# 1. open "Ligon" | |
# 2. New to "Users Daemons" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
class Hello(): | |
def pprint(self): | |
print 'hello' | |
if __name__ == '__main__': | |
h = Hello() | |
h.pprint() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# http://www.geocities.jp/m_hiroi/light/pytk01.html | |
from Tkinter import * | |
root = Tk() | |
button = Button(root, text = 'Hello PyTk') | |
button.pack() | |
root.mainloop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- full_adder.vhdl | |
-- desc: 1bit full adder | |
entity FULL_ADDER is | |
port(A, B, CIN: in bit; | |
SUM, COUT: out bit); | |
end FULL_ADDER; | |
architecture STRUCT of FULL_ADDER is | |
component HALF_ADDER |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# | |
# みんなのPython p388, doctestモジュールのサンプル | |
# | |
# 完全数を求める | |
# e.g. 1000以下の完全数 6, 28, 49 | |
def get_divisor(num): |