Skip to content

Instantly share code, notes, and snippets.

View vvakame's full-sized avatar
💭
❤️ 🐈

Masahiro Wakame vvakame

💭
❤️ 🐈
View GitHub Profile
@vvakame
vvakame / review-ext.rb
Created February 1, 2014 07:35
tslist記法を作って@<list>{hoge} とかで参照したい!
# encoding: utf-8
require 'pp'
require 'review/compiler'
module ReVIEW
class Compiler
defblock :tslist, 2
end
@vvakame
vvakame / review-ext.rb
Created February 13, 2014 10:12
reviewで--target markdown でcmdブロック記法が使えなかったので
# encoding: utf-8
require 'pp'
module ReVIEW
class MARKDOWNBuilder
def cmd(lines)
puts "```"
lines.each do |line|
puts detab(line)
@vvakame
vvakame / result.txt
Created February 19, 2014 08:16
npmでglobalにインストールしてあるものを抜き出してみた
$ npm list -g
/Users/vvakame/.nodebrew/current/lib
├─┬ beefy@0.5.0
│ ├── colors@0.6.2
│ ├── mime@1.2.11
│ ├─┬ nopt@2.1.2
│ │ └── abbrev@1.0.4
│ ├── open@0.0.3
│ ├─┬ portfinder@0.2.1
│ │ └── mkdirp@0.0.7
# Generated by cask-dotfile-generator
# Created by: @seethroughtrees
# https://github.com/seethroughtrees/brew-cask-dotfile-generator
install ack
install ant
install autoconf
install automake
install bdw-gc
@vvakame
vvakame / Brewfile
Last active August 29, 2015 13:58
僕の環境を再現する感じのを書いてみた。ただし一回も実行はしてないっ!
install the-silver-searcher
install tree
install curl
install wget
install zsh
install zsh-completions
install git
install ant
install maven
@vvakame
vvakame / sample.js
Created April 10, 2014 09:22
行単位でdiffが見たい人生だった… https://github.com/kpdecker/jsdiff
require('colors')
var jsdiff = require('diff');
var fs = require("fs");
// var one = 'beep boop';
// var other = 'beep boob blah';
var one = fs.readFileSync("./sampleA.js", {encoding: "utf-8"});
var other = fs.readFileSync("./sampleB.js", {encoding: "utf-8"});
@vvakame
vvakame / git.diff
Created May 16, 2014 03:21
power-assert 0.7.1 から 0.7.2 に更新して減った設定の量。新規に始める人が圧倒的に迷いにくくなった予感…!
diff --git a/bower.json b/bower.json
index 67c9fb4..09ed506 100644
--- a/bower.json
+++ b/bower.json
@@ -11,20 +11,18 @@
"tests"
],
"dependencies": {
- "es5-shim": "3.1.1",
+ "es5-shim": "3.3.0",
@vvakame
vvakame / mirror-api-v1-rest.d.ts
Created June 1, 2014 04:54
こぉいぅのがでるょぅになったょワラ
declare module gapi.client {
module mirror {
var accounts: {
insert: (params: {
accountName: string;
accountType: string;
userToken: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // IAccount
};
var contacts: {
@vvakame
vvakame / drive-v2-rest.d.ts
Created June 1, 2014 04:57
こーゆーの
declare module gapi.client {
module drive {
var about: {
get: (params: {
includeSubscribed?: boolean;
maxChangeIdCount?: string;
startChangeId?: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // IAbout
};
var apps: {
@vvakame
vvakame / bukkonuki.js
Last active August 29, 2015 14:02
Google I/O 2014のセッション情報見づらすぎてやばい
// セッションIDなどの入手方法
// https://www.google.com/events/io/schedule をブラウザで開いてコンソールで以下のJSを実行
var titles = Array.prototype.slice.call(document.querySelectorAll(".event__title")).map(function(node){return node.innerText; });
var rooms = Array.prototype.slice.call(document.querySelectorAll(".event__room")).map(function(node){return node.innerText; });
var ids = Array.prototype.slice.call(document.querySelectorAll(".event__pin")).map(function(node){return node.attributes["data-id"].value; });
var results = []
for(var i = 0; i < titles.length; i++) {
results.push({
id: ids[i],
title: titles[i],