See http://cloc.sourceforge.net/#custom_lang.
$ cloc --by-file-by-lang -read-lang-def=my_definitions.txt ~/github/uwsc/uwsc 4 text files. 4 unique files. 0 files ignored. http://cloc.sourceforge.net v 1.56 T=0.5 s (8.0 files/s, 812.0 lines/s)
# See - https://gist.github.com/1098762 | |
# > realtime markdown preview with Socket.IO | |
fs = require 'fs' | |
http = require 'http' | |
pandoc = require 'pdc' # npm insall pdc, Alse need instll pandoc on PATH. | |
socket = require 'socket.io' # npm install socket.io | |
target = process.argv[2] |
# | |
# https://github.com/katoy/CaptureSite (java) の ruby 版 | |
# | |
require 'rubygems' | |
require 'watir-webdriver' # gem install watir-webdriver | |
require 'selenium-webdriver' # gem install selenium-webdriver | |
require 'uri' | |
require 'pp' |
#!/bin/bash | |
# | |
# usage: | |
# pandoc-pdf 1.md 1.pdf | |
# generater 1.md -> 1.pdf | |
# 1.md: utf-8 encoding | |
# | |
# How to make TEMPLATEFILE: | |
# $ pandoc -D latx > template-kanji.latex | |
# Edit templte-kanji.latex, add |
# 再帰的に Directory 階層を copy していく。 | |
# ただし、 copy するのは *.uws, *.UWS だけを対象とし、utf-8 に encoding 変換もする。 | |
# | |
# using ruby 1.8.7 | |
# 2012-06-10 katoy | |
require 'rubygems' | |
require 'fileutils' | |
require 'pp' | |
require 'kconv' |
See http://cloc.sourceforge.net/#custom_lang.
$ cloc --by-file-by-lang -read-lang-def=my_definitions.txt ~/github/uwsc/uwsc 4 text files. 4 unique files. 0 files ignored. http://cloc.sourceforge.net v 1.56 T=0.5 s (8.0 files/s, 812.0 lines/s)
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, | |
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
// See the License for the specific language governing permissions and |
次のコマンド実行で、tap 出力から html レポートを生成できる。 | |
$ prove -Q --exec="bacon --tap" --formatter=TAP::Formatter::HTML test.rb > 1.html | |
生成レポートの例; | |
http://www.spurkis.org/TAP-Formatter-HTML/test-output.html |
/* description: Parses end executes mathematical expressions. */ | |
/* lexical grammar */ | |
%lex | |
%% | |
\s+ /* skip whitespace */ | |
[0-9]+("."[0-9]+)?\b return 'NUMBER' | |
"*" return '*' | |
"/" return '/' |
# See http://roo.rubyforge.org/rdoc/index.html | |
# roo: This gem allows you to access the content of | |
# Open-office spreadsheets (.ods) | |
# Excel spreadsheets (.xls) | |
# Google (online) spreadsheets | |
# Excel’s new file format .xlsx | |
require 'rubygems' | |
# require 'roo' # なぜかエラーになるので... | |
require '\ruby\Ruby187\lib\ruby\gems\1.8\gems\roo-1.10.1\lib\roo.rb' |
package katoy; | |
public class Division { | |
private double numerator, denominator; | |
public void setNumerator(double numerator) {this.numerator = numerator;} | |
public void setDenominator(double denominator) {this.denominator = denominator;} | |
public double quotient() {return numerator/denominator;} | |
} |