View main.js
var exec=require('child_process').exec;
var arr=[
'requests',
'httpsRequests',
'bodySize',
'contentLength',
'httpTrafficCompleted',
'timeToLastByte',
View main.sh
$ phantomas --url http://google.com
View capture.js
var page = require('webpage').create();
var width = 1200;
var height = 768;
page.viewportSize = {
width: width,
height: height
};
page.open('http://localhost:8000/', function () {
View main.sh
$ curl -o '#1.png' http://placehold.jp/888888/ffffff/40x40.png?text=[1-100]
View main.py
# -*- coding: utf-8 -*-
import os
import sys
import os.path
dir = './'
files = os.listdir(dir)
for file in files:
print '--'
View gulpfile.coffee
# modules
gulp = require 'gulp'
connect = require 'gulp-connect'
coffee = require 'gulp-coffee'
gutil = require 'gulp-util'
sourcemaps = require 'gulp-sourcemaps'
concat = require 'gulp-concat'
gulpif = require 'gulp-if'
uglify = require 'gulp-uglify'
View gist:6493006
[self performSelector:@selector(timerHandler) withObject:nil afterDelay:1.0];
View gist:5992631
// !が重要。テキスト部分に関しては特に何もしなくても大丈夫。属性値部分は=だけだとエンコードされちゃう。
a(href!='<?php echo $foo; ?>') <?php echo $foo; ?>
View gist:5990479
montage -rotate 90 -resize x300 -geometry +0+0 -tile x1 in0.png in1.png out.png
View gist:5939307
class Hoge
constructor:()->
createjs.Ticker.addEventListener('tick',@_checkStage)
_checkStage:()=>
if @getStage()
createjs.Ticker.removeEventListener('tick',@_checkStage)
createjs.Ticker.addEventListener('tick',@_onTick)