Skip to content

Instantly share code, notes, and snippets.

View tmaeda1981jp's full-sized avatar
🏠
Working from home

tmaeda1981jp tmaeda1981jp

🏠
Working from home
  • Sidechest Co., Ltd.
  • Sapporo
View GitHub Profile
@tmaeda1981jp
tmaeda1981jp / gist:05ca3bcd6391c31d6342
Created June 16, 2015 03:54
git diffでspaceを無視する
git diff --ignore-space-change
/*jslint white: true, nomen: true, maxlen: 120, plusplus: true, */
/*global _:false, $:false, define:false, require:false, */
console.log('test for gist.el');
/*jslint white: true, nomen: true, maxlen: 120, plusplus: true, */
/*global _:false, $:false, define:false, require:false, */
var result = (function(array) {
if (array.length < 2) { return array; }
var base = array[Math.ceil(array.length / 2)],
central = [],
lower = [],
@tmaeda1981jp
tmaeda1981jp / Gruntfile.js
Created June 30, 2014 01:51
My livereload setting.
/*jslint white: true, nomen: true, maxlen: 120, plusplus: true, node: true, */
/*global module:false, */
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
connect: {
var executeOnce = (function() {
var executed = false;
return function() {
if (!executed) {
executed = true;
console.log("executed");
}
else {
console.log("already executed");
}
@tmaeda1981jp
tmaeda1981jp / progress.js
Last active December 30, 2015 09:19
text progress bar example
String.prototype.repeat = function(num) {
return new Array(num + 1).join(this);
};
var sprintf = require('sprintf'),
util = require('util'),
colors = require('colors'),
total = 10000,
i;
@tmaeda1981jp
tmaeda1981jp / benchmark.html
Created October 15, 2013 06:12
simple benchmark.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>benchmark</title>
</head>
<body>
<script type="text/javascript">
(function() {