Skip to content

Instantly share code, notes, and snippets.

View 79yuuki's full-sized avatar
🌴
On vacation

Yuki Shichiku 79yuuki

🌴
On vacation
View GitHub Profile
@79yuuki
79yuuki / keybase.md
Created September 9, 2019 19:01
keybase.md

Keybase proof

I hereby claim:

  • I am 79yuuki on github.
  • I am 79yuuki (https://keybase.io/79yuuki) on keybase.
  • I have a public key ASB3bX_1udfDW-noFz7SIpSernxz0pEs8TGKzVCbWC0O7wo

To claim this, I am signing this object:

@79yuuki
79yuuki / keybase.md
Created September 9, 2019 18:56
keybase.md

Keybase proof

I hereby claim:

  • I am 79yuuki on github.
  • I am 79yuuki (https://keybase.io/79yuuki) on keybase.
  • I have a public key ASB3bX_1udfDW-noFz7SIpSernxz0pEs8TGKzVCbWC0O7wo

To claim this, I am signing this object:

@79yuuki
79yuuki / Gruntfile.js
Created October 9, 2013 10:52
gruntfile
module.exports = function(grunt) {
'use strict';
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-stylus');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-img');
grunt.registerTask('default', ['stylus', 'copy', 'uglify', 'cssmin', 'img']);
@79yuuki
79yuuki / batch.js
Created August 7, 2013 11:05
npm batch demo
var Batch = require('batch')
, batch = new Batch;
var self = this;
batch.concurrency(4);
var ids = [0,1,2,3];
var fleetName = ['加賀', '赤城', '島風', '出雲'];
@79yuuki
79yuuki / jsRegExpPerf.js
Created May 8, 2013 06:52
Performance verification of indexOf & RegExp of JavaScript
var a = [], n=10000;
for(var i=0; i<n; i++){
a.push('item:' + i);}
var str = a.join('\n');
// test1
var s = new Date();
for(var i=0; i<3000; i++){
var m = str.indexOf('item:9999');
}
console.log('#test1 ' + (new Date() - s) + '(ms) result:'+ m);
@79yuuki
79yuuki / expectThrowError.js
Created March 14, 2013 03:30
expect.js test tips
function targetMethod(param) {
if(param === null || param === undefined) {
throw new Error('param is empty.');
}
if(typeof param !== 'string') {
throw new Error('param must be a Number.');
}
console.log(param);
@79yuuki
79yuuki / hello-zombie.js
Created February 20, 2013 07:13
Zombie.js test.
var Browser = require("zombie");
var assert = require("assert");
browser = new Browser();
browser.on('error', function(error) {
console.log(error);
});
// Load the page from AmebaBlog.