Skip to content

Instantly share code, notes, and snippets.

@yurfuwa-chan
yurfuwa-chan / grunt.js
Last active December 10, 2015 23:38
grunt-contrib
module.exports = function(grunt){
var date = new Date();
var d = date.getFullYear() + "" + (date.getMonth()+1) + "" + date.getDate();
grunt.initConfig({
htmllint:{
all:['../bin/*.html']
},
copy: {
build:{
files:{
@yurfuwa-chan
yurfuwa-chan / app.js
Last active December 10, 2015 22:09
express + ejs + express-partial
var express = require('express');
var http = require('http');
var partials = require('express-partials');
var app = express();
var server = http.createServer(app);
var path = require('path');
var ejs = require('ejs');
app.configure(function(){
app.use(partials());
@yurfuwa-chan
yurfuwa-chan / removeGuildLayer.jsfl
Last active December 10, 2015 03:08
Flaファイル内のガイドレイヤを全部削除するJSFL
var doc = fl.getDocumentDOM()
var lib = doc.library;
var n = 0;
document.timelines.forEach(function(timeline){
removeGuildLayer(timeline)
})
lib.items.forEach(function(item){
removeGuildLayer(item)
})
@yurfuwa-chan
yurfuwa-chan / gist:4337994
Created December 19, 2012 16:25
カーソルを自動的に()の中へ
" カーソルを自動的に()の中へ
imap {} {}<Left>
imap [] []<Left>
imap () ()<Left>
imap "" ""<Left>
imap '' ''<Left>
imap <> <><Left>
imap // //<left>
imap /// ///<left>
@yurfuwa-chan
yurfuwa-chan / ClickSpec.js
Created December 14, 2012 12:23
mocha zombie
var assert = require("assert")
var Browser = require("zombie")
describe("description", function() {
var browser = new Browser();
var window = null;
var $ = null;
beforeEach(function(done){
browser.visit("http://private.localhost/private/test/zombie-mocha/",function(){
@yurfuwa-chan
yurfuwa-chan / grunt.js
Created December 12, 2012 11:00
gruntでhtmllintする
module.exports = function(grunt){
grunt.initConfig({
htmllint:{
all:['index.html']
},
watch:{
files:['index.html'],
tasks:'htmllint'
}
});
@yurfuwa-chan
yurfuwa-chan / gist:3922800
Created October 20, 2012 09:40
gruntjs+jasmine-headless-webkit
//https://github.com/gruntjs/grunt/
module.exports = function(grunt){
grunt.initConfig({
//execタスクとしてjasmine-headless-webkitを追加。
exec:{
jasmine:{
command:"jasmine-headless-webkit",
stdout:true
}
@yurfuwa-chan
yurfuwa-chan / find.sh
Created August 23, 2012 10:28
findで探してパイブwhile回す
//findで探してパイブwhile回す
find ... | while read f; do
echo $f
echo $(basename $f)
done
<script src="raphael.2.1.0.min.js"></script>
<script src="justgage1.0.min.js"></script>
//..
<div id="gauge" class="200x160px"></div>
//..
<script>
var template = new t("<div>Hello {{=name}}</div>");
document.body.innerHtml = template.render({name: "World!"});