Skip to content

Instantly share code, notes, and snippets.

@miyagawa
miyagawa / gitweb.psgi
Created March 27, 2010 13:54
Running gitweb.cgi on Plack
# 1. Download git and make gitweb/gitweb.cgi (See gitweb/INSTALL how to set gitweb root etc.)
# 2. Copy this file as gitweb/app.psgi
# 3. cd gitweb; plackup
# 4. Access http://localhost:3000/gitweb.cgi
use Plack::Builder;
use Plack::App::WrapCGI;
use Plack::App::File;
builder {
@sugyan
sugyan / preview.psgi
Created July 20, 2011 07:13
realtime preview for markdown / xatena / pod
#!/usr/bin/env plackup
use strict;
use warnings;
use Amon2::Lite;
use Encode 'encode_utf8';
use Text::Markdown 'markdown';
use Text::Xatena;
use Pod::Simple::XHTML;
@theconektd
theconektd / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@nekoya
nekoya / cloudforecast.md
Last active October 31, 2015 16:44
wiki/cloudforecast

cloudforecast

setup

source

  • git://github.com/kazeburo/cloudforecast.git

system Perl + local::lib + cpanmで入れる

  • local::libを--bootstrap=/path/to/cloudforecast/extlibで入れる
@kaishuu0123
kaishuu0123 / xv6.md
Last active April 23, 2022 15:56
xv6 を読む
@kitak
kitak / doc.md
Last active October 18, 2023 09:57
コマンドによる「負荷」の原因切り分け

コマンドによる「負荷」の原因切り分け

この文章では、Linuxコマンド、sar, top, psを使って、一般的に負荷といわれるものの原因を切り分けることを目的とする。

そもそも負荷とは

「複数のタスクによるサーバリソースの奪い合いの結果に生じる待ち時間」を一言で表した言葉。OSのチューニングとは負荷の原因を知り、それを取り除くことにほかならない。

ボトルネックの見極め作業の大まかな流れ

  • ロードアベレージ(処理を実行したくても、実行できなくて待たされているプロセス(CPUの実行権限が与えられるのを待っている、またはディスクI/Oが完了するのを待っている)の数)を見る
@shinyaohira
shinyaohira / View Controller Programming Guide for iOS.md
Last active July 19, 2023 13:23
iOS View Controllerプログラミングガイド

storyboard上で、initial view controllerから他のview controllerに対してrelationshipを確立します。同様に、それらのview controllerから他のview controllerにrelationshipを確立します。最終的に、storyboard上のほとんど、あるいは全てのview controllerを一つのグラフに接続します。接続されたview controllerが、iOSによっていつインスタンス化されるかは、relationshipのタイプによって決まります。

@plentz
plentz / nginx.conf
Last active June 3, 2024 13:58
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@tigawa
tigawa / csv.js
Created February 7, 2014 06:53
CSVファイルをJavaScriptから読込み方法 (ファイルを指定すると、2次元配列で結果はを返す。)
function csv2Array(filePath) { //csvファイルノ相対パスor絶対パス
var csvData = new Array();
var data = new XMLHttpRequest();
data.open("GET", filePath, false); //true:非同期,false:同期
data.send(null);
var LF = String.fromCharCode(10); //改行コード
var lines = data.responseText.split(LF);
for (var i = 0; i < lines.length;++i) {
var cells = lines[i].split(",");
@everpeace
everpeace / Why People Want Microservices.md
Last active November 8, 2022 10:37
マイクロサービス化が進む背景について考えてみた

マイクロサービス化が進む背景について考えてみた

最近マイクロサービスって流行ってますよね。バズってると言ってもいいくらい。

個人的には、「マイクロサービスって結局何なの?」とか、「SOAと何が違うわけ?」とかいう議論は苦手です。

でも「なんでみんなマイクロサービスで作りたいのか?なんでマイクロサービスで作られるサービスが多いのか?」にはすごく興味があるんです。

僕は今、シリコンバレーにある日系SIerの小さな子会社で駐在員をやっていますが、このエリアに居ると、とにかく最近、

「サービス全体が、独立した小さなサービスの集合で構成されるようになってきている」