Skip to content

Instantly share code, notes, and snippets.

Sunday November 11, 2018 the Mushroom Observer database server was upgraded from 4 CPU cores to 6 CPU cores and the available RAM was doubled.

Around November 22, Alan Rockefeller analysed the logs to see what the impact was. He compared the previous week to the entire month of October 2018 and found:

Average time to respond to requests pre-upgrade: 2.29117 seconds (every request in October averaged)

Average time to respond to requests post-upgrade: 1.57632 seconds (every request in the past week averaged)

@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)
}

@antipop

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

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

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

  • 負債の要因や意図を問わないモデル化
@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
(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")
@Songmu
Songmu / .slate.js
Last active December 14, 2015 15:39
S.on('appActivated', function (event, app) {
S.log('appActivated:' + app.name());
});
@Shinpeim
Shinpeim / 000.md
Last active January 22, 2022 07:31
プロセスとかスレッドとかプロセス間通信とかについて書く場所

重要

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

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

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

この文書の目的

@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
@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
#
@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 = {