Skip to content

Instantly share code, notes, and snippets.

View hidsh's full-sized avatar

yakshaver hidsh

View GitHub Profile
@hidsh
hidsh / gist:2342369
Created April 9, 2012 08:44
xyzzy: backward-delete-word-no-kill, kill-word-no-kill
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;@@@ backward-delete-word-no-kill
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun backward-delete-word-no-kill ()
(interactive)
(let ((dest (save-excursion
(progn (backward-word)
(point)))))
(if (bolp) (backward-delete-char-untabify 1)
(while (and (< dest (point)) (not (bolp)))
@hidsh
hidsh / MathJax-jquery.html
Last active February 18, 2022 00:32
mathjax interactive preview
<!-- this document is fully based on MathJax-jquery.html by kurokigen. -->
<html>
<head>
<title>Live Preview of MathJax Type Setting</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ tex2jax: { inlineMath: [['$','$'], ["\\(","\\)"]] } });
</script>
<script type="text/javascript"
src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
@hidsh
hidsh / my_fact.sci
Created May 8, 2012 09:49
scilab: recursive call test
function y=my_fact(n)
if n==1 then
y=1;
else
y=n*my_fact(n-1);
end
endfunction
@hidsh
hidsh / my_length.sci
Created May 8, 2012 10:02
scilab: recursive call test 2
function y=my_length(m)
if length(m)<=1 then
y=1;
else
y=1+my_length(2:length(m))
end
endfunction
@hidsh
hidsh / my_disp.sce
Created May 8, 2012 10:22
scilab: disp
function my_disp(m)
printf(':%d\n',m(1));
if length(m)<=1 then
;
else
my_disp(m(2:length(m)))
end
endfunction
@hidsh
hidsh / Row.py
Created May 30, 2012 01:27
xlwt mod - C:\Python26\Lib\site-packages\xlwt\Row.py
# -*- coding: windows-1252 -*-
# mod
# http://peta.okechan.net/blog/archives/723
import BIFFRecords
import Style
from Cell import StrCell, BlankCell, NumberCell, FormulaCell, MulBlankCell, BooleanCell, ErrorCell, \
_get_cells_biff_data_mul
import ExcelFormula
@hidsh
hidsh / com_excel.py
Created June 26, 2012 03:25
control excel using COM by python
# -*- coding:utf-8 -*-
# com_excel.py
# http://www.dzone.com/snippets/script-excel-python
#
# description:
# A quick and dirty class for working with Excel via COM in Python.
# By far, not all of the power of Excel is available here, but it's a good start for simple tasks.
from win32com.client import constants, Dispatch
import pythoncom
@hidsh
hidsh / op_overload.py
Created June 26, 2012 03:26
python sample: operator overload
# sample: operator overload
class C1:
def __init__(self):
self.val_plus = 0
self.val_minus = 0
def __setattr__(self, attr, val):
if attr=='val_plus':
self.__dict__[attr] = val if val>0 else 0
@hidsh
hidsh / nas-svn.txt
Created June 26, 2012 03:26
svn repos w/o server
memo: svn repos w/o server
リポを作る
-----------------------------------------------------------------------
1. 管理したいプロジェクトのフォルダをここに作る。
e.g. \\{NAS}\hv_ap\10_user\shishido\__my_svn_repo__\test とか
^^^^
2. 下のような構成にする
__my_svn_repo__
|
@hidsh
hidsh / nas-svn.txt
Created June 26, 2012 03:27
svn repos w/o server
memo: svn repos w/o server
リポを作る
-----------------------------------------------------------------------
1. 管理したいプロジェクトのフォルダをここに作る。
e.g. \\{NAS}\hv_ap\10_user\shishido\__my_svn_repo__\test とか
^^^^
2. 下のような構成にする
__my_svn_repo__
|