Skip to content

Instantly share code, notes, and snippets.

@gothedistance
gothedistance / calc_jancode_digit.php
Last active August 29, 2015 13:56
JANコードのチェックデジットを計算するPHPコード
<?php
function calcJanCodeDigit($num) {
$arr = str_split($num);
$odd = 0;
$mod = 0;
for($i=0;$i<count($arr);$i++){
if(($i+1) % 2 == 0) {
//偶数の総和
$mod += intval($arr[$i]);
} else {
@punchagan
punchagan / gist:836799
Created February 21, 2011 08:07
Archive DONE items to datetree based on CLOSED time
(defadvice org-archive-subtree
(around org-archive-subtree-to-data-tree activate)
"org-archive-subtree to date-tree"
(if (org-entry-is-done-p)
(let* ((dct (decode-time
(org-time-string-to-time
(cdar (org-entry-properties nil 'special "CLOSED")))))
(y (nth 5 dct))
(m (nth 4 dct))
(d (nth 3 dct))
;;設定
;;(require 'git-status)
;;psvn.el http://www.xsteve.at/prg/emacs/psvn.el からの移植
(eval-when-compile (require 'cl))
(require 'vc-git)
(add-to-list 'vc-handled-backends 'Git)
(defvar git-status-state-mark-modeline t
"modeline mark display or not")