Skip to content

Instantly share code, notes, and snippets.

View dsuket's full-sized avatar

dsuket dsuket

  • Tokyo
View GitHub Profile
alias dps='docker ps -a'
alias dl='docker ps -l -q'
alias di='docker images'
alias drun='docker run -it --rm'
alias dstop='docker stop $(dl)'
alias dstopa='docker stop $(docker ps -a -q)'
alias drm='docker rm'
alias drmi='docker rmi'
alias drma='docker rm $(docker ps -a -q)'
@dsuket
dsuket / stream-test.js
Last active March 30, 2016 15:32
Observable Test using RxJS
'use strict';
const assert = require('power-assert');
const {Observable} = require('rxjs/Rx');
describe('Stream', () => {
const expectedCount = 20;
// create something stream
function createStream() {
@dsuket
dsuket / js-scale
Last active July 12, 2017 03:22
js scale like D3
(function() {
/**
Usage:
```javascript
var userScale = scale()
.domain(0, 10)
.range(0,100);
userScale(2);
// => 20
@dsuket
dsuket / _.md
Created June 18, 2013 09:43
Tributary inlet
@dsuket
dsuket / Gruntfile.js
Last active December 17, 2015 20:28
更新されたファイルだけ対象にするフィルタの定義
module.exports = function(grunt) {
var fs = require('fs');
// ファイルのmtimeを比較
var compareMtime = function(src, target) {
var isNewer = true;
if (fs.existsSync(target)) {
isNewer = fs.statSync(src).mtime > fs.statSync(target).mtime;
}