Skip to content

Instantly share code, notes, and snippets.

View ahomu's full-sized avatar

Ayumu Sato ahomu

View GitHub Profile
var input = process.argv[2];
var compiler = require('coffee-script-redux');
var fs = require('fs');
var escodegen = require('escodegen');
var data = fs.readFileSync(input, {encoding: 'utf-8'});
var tokens = compiler.parse(data);
var ast = compiler.compile(tokens);
var output = escodegen.generate(ast);
@ahomu
ahomu / 1.fuga.es6.js
Created December 18, 2014 01:21
すげえ限定的なケースをちょっと比べてみただけなので、あまりに真にうけないでください.js
export default {}
@ahomu
ahomu / .eslintrc
Last active August 29, 2015 14:16
default off の項目をチェックしていくだけでも疲れました.eslintrc
{
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"mocha": true
},
"rules": {
@ahomu
ahomu / __error__
Created May 11, 2015 11:22
ふむーん
src/shared/idb-store-base.ts(3,29): error TS2497: External module ''idb-wrapper'' resolves to a non-module entity and cannot be imported using this construct.
@ahomu
ahomu / .eslintrc
Last active September 12, 2015 01:40
.eslintrc めんどくさいんじゃー!! v1.3.0
{
"parser": "babel-eslint",
"plugins": ["react"],
"env": {
"browser": true,
"node": true,
"mocha": true
},
"ecmaFeatures" : {
"jsx": true
@ahomu
ahomu / css2inline.php
Created January 28, 2011 05:04
head内のCSSをインラインに置き換える ゆるふわPHP
<?php
/**
* まだ途中. とりあえずCSSをセレクタとプロパティに大ざっぱに分割したとこ
*/
error_reporting(E_ALL);
ini_set('display_errors', 1);
$resourse = <<< DOC_END
@ahomu
ahomu / JapanMapChart.php
Created February 7, 2011 07:01
Japan Map Chart (using aka Chart API)
<?php
// http://code.google.com/intl/ja/apis/chart/docs/gallery/new_map_charts.html
// detectColorメソッドを実装して,値に対して色(16進数)を割り振る
abstract class JapanMapChart
{
private
$_baseUrl,
$_params,
@ahomu
ahomu / gist:833422
Created February 18, 2011 08:42
Google Readerで胡散臭いタイトルのエントリをどうこうしたいぞ的な
// ==UserScript==
// @name Trash Hotentry
// @namespace http://havelog.ayumusato.com/
// @description くずかごフィルター
// @include http://www.google.com/reader/view*
// @version 0.1
// ==/UserScript==
(function(doc) {
setInterval(function() {
@ahomu
ahomu / KyonenNoOmoide.html
Created March 10, 2011 09:58
[a-blog cms] (去年|むかし)のおもいでモジュール
テンプレートはこんなかんじで
<!-- BEGIN_MODULE Sample_KyonenNoOmoide -->
<p>去年のおもいで</p>
<ul><!-- BEGIN omoide:loop -->
<li><a href="{url}">{title}</a></li><!-- END omoide:loop --><!-- BEGIN notFound -->
<li>おもいでなかった・・・</li><!-- END notFound -->
</ul>
<!-- END_MODULE Sample_KyonenNoOmoide -->