Skip to content

Instantly share code, notes, and snippets.

djb

みんなそろそろ D.J. Bernstein が世界史上最高のプログラマだというのを思い出すべきだと思うんだ。

まず、客観的な事実だけを見てみよう。 djb は2つの重要なシステムソフトウェアを書いた。 メールサーバと DNS サーバだ。 どちらも何百万というドメインで使われている。 ありとあらゆる複雑な仕事をこなし、とてつもない高負荷でも問題ないし、どんな異常事態にも対応する。 これらは、Bernstein が最初にリリースしたときとまったく同じものが動いてるのだ。

@ohnishiakira
ohnishiakira / .gemrc
Created August 1, 2011 03:13
.gemrcの書き方
# 普段はこう書いている
install: --no-rdoc --no-ri
update: --no-rdoc --no-ri
search: --remote
specification: --remote
@kiesia
kiesia / attributes-default.rb
Created July 5, 2012 06:12 — forked from philwo/attributes-default.rb
Chef cookbook for nginx + passenger (compiled from source)
default['nginx']['version'] = "1.2.0"
default['nginx']['passenger']['version'] = "3.0.12"
@kachick
kachick / compare_array.rb
Created September 25, 2012 14:55
Array 要素すべてが#==で一致するか調べる
values = [1, 2, 3]
others = [1.0, 2.0, 3.0]
(values.length == others.length) && values.each_with_index.all?{|v, idx|v == others.fetch(idx)}
@X0nic
X0nic / disable-vagrant-time-sync.sh
Last active February 4, 2022 04:52
Disable vagrant time sync
#List vms
VBoxManage list vms
#get status of time sync
VBoxManage getextradata <vm-name> VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled
#NOTE: Make sure to restart the VM after changing these settings.
#disable time sync
VBoxManage setextradata <vm-name> VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled 1
@fujimura
fujimura / pipe.rb
Last active December 18, 2015 16:59
Object#pipe
class Object
def pipe
yield self
end
end
# From https://github.com/rspec/rspec-rails/pull/766/files
# Without Object#pipe
types = begin
@shunito
shunito / BeBe_sample.html
Last active December 26, 2015 16:09
BeBeはBiB/i の薄いラッパーです。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>BeBe Sample</title>
<style>
h1 { font-size: 120%; }
</style>
<script src="js/jquery-1.9.1.js"></script>
<script>
require 'httpclient'
require 'json'
module HTTP
class Message
# Returns JSON object of message body
alias original_content content
def content
if JSONClient::CONTENT_TYPE_JSON_REGEX =~ content_type
JSON.parse(original_content)
@rtoal
rtoal / htmlCollectionIteratorPolyfill.js
Created December 14, 2016 16:52
Polyfill allowing iteration of Safari's HTMLCollection objects
// Polyfill because Safari's HTMLCollections are not iterable
if (typeof HTMLCollection.prototype[Symbol.iterator] !== 'function') {
HTMLCollection.prototype[Symbol.iterator] = function () {
let i = 0;
return {
next: () => ({done: i >= this.length, value: this.item(i++)})
}
};
}
@dmnsgn
dmnsgn / WebGL-WebGPU-frameworks-libraries.md
Last active November 17, 2024 08:50
A collection of WebGL and WebGPU frameworks and libraries

A non-exhaustive list of WebGL and WebGPU frameworks and libraries. It is mostly for learning purposes as some of the libraries listed are wip/outdated/not maintained anymore.

Engines and libraries ⚙️

Name Stars Last Commit Description
three.js ![GitHub