Skip to content

Instantly share code, notes, and snippets.

@makotot
makotot / eslint-memo.md
Last active August 29, 2015 13:58
eslint memo

The pluggable linting utility for JavaScript

JSHintJSLintはユーザ独自のルールを追加することはできないけれど、ESLintは完全に全てのルールがプラガブルになるようデザインされている。

Install

$ npm install -g eslint
@makotot
makotot / 0_reuse_code.js
Last active August 29, 2015 14:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@makotot
makotot / gist:2421337
Created April 19, 2012 14:33
raphael customattributes.elliptical.arc
var paper = Raphael(0, 0, 800, 800);
paper.customAttributes.ellipticalArc = function(xloc, yloc, value, total, xR, yR) {
var alpha = 360 / total * value,
a = (90 - alpha) * Math.PI / 180,
x = xloc + xR * Math.cos(a),
y = yloc - yR * Math.sin(a),
path;
if (total === value) {
@makotot
makotot / testacular.md
Created November 4, 2012 15:51
Testacular

Testacular

TestacularはNodeとsocket.ioにより、複数のブラウザでJavaScriptを実行できるツール。

テスト駆動開発を容易・高速に行えるようにすることが目的。

install

$ npm install -g testacular
@makotot
makotot / Nodefront.md
Created November 26, 2012 16:06
Nodefront
@makotot
makotot / gitolite_aws_ubuntu.md
Created December 18, 2012 14:51
gitolite on AWS EC2 ubuntu instance

AWS

security group

  • aws management consoleでセキュリティグループを作成
  • inboundでHTTPを選択(0.0.0.0/0のままで)
  • inboundでSSHを選択(0.0.0.0/0のままで。自分のIPに変更したら、そのIPからしかアクセスできない)

instance

@makotot
makotot / grunt_getting_started.md
Last active December 11, 2015 03:48
Grunt Getting started

gruntは、javascriptで書かれたタスクベースのコマンドラインツール。なぜgruntか?

installing the CLI

すでにgruntをグローバルインストール済みの場合、 最初にnpm uninstall -g gruntで削除しておく必要がある。

@makotot
makotot / installing_grunt.md
Created January 16, 2013 15:49
Installing grunt

一般的なインストールに関する説明はGetting Startedで読んでほしい。そのあとにより詳細な情報を得たければ、これを読んでもらいたい。

Overview

Gruntはgruntgrunt-cliの2つから成る。

  1. npmモジュールgruntはプロジェクトのローカルにインストールすべき。これは、プラグインの読み込みやタスクの実行などに関するコードとロジックを構成する。
@makotot
makotot / createing_plugins.md
Created January 21, 2013 13:33
Creating plugins · gruntjs/grunt Wiki

Creating plugins

  1. npm install -g grunt-initgrunt-initをインストール。
  2. 空のディレクトリでgrunt-init gruntpluginを実行する。
  3. 開発環境用意のためnpm installを実行する。
  4. プラグインを作成する
  5. npmに公開するためにnpm publishを実行する。
@makotot
makotot / automaton.md
Last active December 11, 2015 13:18
Automaton Task automation tool built in JavaScript. AutomationのREADME

JavaScriptでつくられたタスク自動化ツール。

Why?

繰り返しの作業に直面することは度々あるが、その為だけのスクリプトをつくることが一般的である。だけれども、プロジェクト毎に以前作ったものを再利用する必要性を感じると思う。

Automatonは、順序づけられたタスクのリストを用いて、やりたいことを記述するautofileを設定することで、この作業を容易にする。