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)
{ | |
"total":5, | |
"records":5, | |
"page":1, | |
"rows":[{ | |
"id":"1", | |
"cell":[ | |
"a", | |
"AAA", | |
0,"",false,true,true |
# 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] |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>Treegrid using json</title> | |
<link rel="stylesheet" type="text/css" media="screen" href="css/ui-lightness/jquery-ui-1.8.17.custom.css" /> | |
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" /> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> |
# | |
# 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 '/' |