Skip to content

Instantly share code, notes, and snippets.

@yurfuwa-chan
yurfuwa-chan / gist:3922800
Created October 20, 2012 09:40
gruntjs+jasmine-headless-webkit
//https://github.com/gruntjs/grunt/
module.exports = function(grunt){
grunt.initConfig({
//execタスクとしてjasmine-headless-webkitを追加。
exec:{
jasmine:{
command:"jasmine-headless-webkit",
stdout:true
}
@nbqx
nbqx / app.js
Created December 19, 2012 04:43
var fs = require('fs');
var vm = require('vm');
var _ = require('underscore');
var src = fs.readFileSync('test.js');
var code = (_.template("'use strict';(<%= src %>)(req,res)"))({src: src});
var app = require('express')();
app.get('/',function(req,res){
var cxt = {
@hryk
hryk / pomosound-macruby.rb
Last active December 11, 2015 23:08
20分~30分くらいの曲を探してきて適当に再生する。MacRubyで。
#!/usr/bin/env ruby
#encoding: utf-8
#
# TODO
# ----
#
# # Output inventories as HTML.
# ./pomosound.rb report > report.html
#
@hryk
hryk / terminate-and-relaunch-app.rb
Last active December 12, 2015 00:08
Terminate and re-launch an application with MacRuby.
#!/usr/bin/env ruby
#encoding: utf-8
framework 'Cocoa'
framework 'ApplicationServices'
framework 'AppKit'
# Get a list of applications currently running.
ws = NSWorkspace.sharedWorkspace
@Shinpeim
Shinpeim / 000.md
Last active January 22, 2022 07:31
プロセスとかスレッドとかプロセス間通信とかについて書く場所

重要

サイズがあまりに大きくなってしまったので、gist ではなくて github 上で管理するようにしました。

https://github.com/Shinpeim/process-book

URL 変わっちゃうの申し訳ないんだけど、一覧性が高くなるのと pull req が受け取れるメリットのほうを取ります。せっかく読みにきてくれたのにひと手間かかっちゃってすみません。

この文書の目的

@Songmu
Songmu / .slate.js
Last active December 14, 2015 15:39
S.on('appActivated', function (event, app) {
S.log('appActivated:' + app.name());
});
(ns yes
(:use [overtone.live]
[clojure.data.json :only [read-json]])
(:require [echonest-api.core :as echonest]
[http.async.client :as client]))
;; Kierra "Kiki" Sheard - Yes (2006)
;; http://www.youtube.com/watch?v=4LgXAWeGqDE
(def mp3 "data/yes.mp3")
(def wav "data/yes.wav")
@kohsuke
kohsuke / git-children-of
Created November 21, 2013 21:44
Given a commit, find immediate children of that commit.
#!/bin/bash -e
# given a commit, find immediate children of that commit.
for arg in "$@"; do
for commit in $(git rev-parse $arg^0); do
for child in $(git log --format='%H %P' --all | grep -F " $commit" | cut -f1 -d' '); do
git describe $child
done
done
done

@antipop

技術的負債の分類 (Kruchten et al., 2012)

  • コードの負債は見えるので検出し易いけど、アーキテクチャの負債は見えないので大変
  • アーキテクチャの再構築、リファクタリング

可能的代替システムとの差異(Schmid, 2013)

  • 負債の要因や意図を問わないモデル化
@jfsiii
jfsiii / fetch-chunked.js
Last active March 30, 2024 01:37
Quick example of using fetch to parse a chunked response
var chunkedUrl = 'https://jigsaw.w3.org/HTTP/ChunkedScript';
fetch(chunkedUrl)
.then(processChunkedResponse)
.then(onChunkedResponseComplete)
.catch(onChunkedResponseError)
;
function onChunkedResponseComplete(result) {
console.log('all done!', result)
}