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
/* ------------------------------------ | |
javascript function | |
for multiple onload functions | |
------------------------------------ */ | |
function _onload(func){ | |
var tmp = (window.onload == undefined) ? null : window.onload; | |
window.onload = function(){ | |
if(tmp != null) tmp(); | |
func(); |
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
; gauche module to write code simply | |
(define-module simply | |
(use srfi-1) | |
(use srfi-13) | |
(use rfc.http) (use rfc.uri) (use rfc.base64) (use file.util) | |
(use gauche.charconv) (use gauche.process) | |
(export-all) | |
) | |
(select-module simply) |
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
class ISBN | |
attr_reader :isbn | |
# =initialize | |
def initialize(isbn) | |
@isbn = isbn.strip.gsub(/[\s\-]/, "")# {{{ | |
@type = nil | |
@type_checked = false | |
end# }}} | |
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
// ==UserScript== | |
// @include http://gist.github.com/* | |
// ==/UserScript== | |
(function(){ | |
var $ = function(id){ | |
return document.getElementById(id); | |
}; | |
var classLoop = function(tag_name, class_name, func){ | |
var tags = document.getElementsByTagName(tag_name); |
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
(use file.util) | |
(use simply) | |
; =make-csv-row-name-hash | |
(define (make-csv-row-name-hash row);{{{ | |
(let1 hs (make-hash-table) | |
(let loop((ls row) (i 0)) | |
(cond | |
[(null? ls) | |
hs |
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
Global setup: | |
Download and install Git | |
git config --global user.email ***@***.com | |
Next steps: | |
mkdir opera-widgets | |
cd opera-widgets | |
git init | |
touch README | |
git add README |
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 | |
# script for replacing multiple files | |
# | |
# usage: ./replace.sh [directory] [filter] [before] [after] | |
# | |
# ex) replace "e" to "a" for all htm/html file in current dir | |
# # ./replace . 'html?$' e o | |
if [ $# -eq 0 ] | |
then |
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
(use gauche.process) | |
(use rfc.uri) | |
(use simply) | |
(define *open-uri-command* "start") | |
(define *config-file-name* "wuc.conf") | |
; =read-config | |
; ------------------------------------------------------- | |
(define (read-config) |
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
#| | |
| Simple Gauche Web Framework | |
|# | |
(define-module sgwf | |
(use www.cgi) | |
(use text.html-lite) | |
(use sxml.serializer) | |
(use gauche.interactive) | |
(use simply) |
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
(define-module isbn | |
(use simply) | |
(export get-isbn-type isbn10->isbn13 isbn13->isbn10) | |
) | |
(select-module isbn) | |
#| *-- PUBLIC --* | |
|# | |
; =get-isbn-type |
OlderNewer