Skip to content

Instantly share code, notes, and snippets.

View voluntas's full-sized avatar
🎲
Focusing

voluntas voluntas

🎲
Focusing
View GitHub Profile
@rustyio
rustyio / gproc_tests.erl
Created September 16, 2009 13:16
gproc_tests.erl
-module(gproc_tests).
-compile(export_all).
-include_lib("stdlib/include/qlc.hrl").
go() -> make:all([load]).
register_stuff() ->
gproc:reg({n, l, key1}, value1),
gproc:reg({n, l, key2}, value2),
gproc:reg({n, l, key3}, value3),
-module(mnesia_repl_and_frag).
-compile([export_all]).
-record(store, {key, value}).
%% Usage:
%% Start secondary node, at first. Not a typo :-)
%% Then start primary at another node.
@hirotnk
hirotnk / tp.erl
Created December 6, 2010 06:00
ETS, Mnesia performance tests
-module(tp).
-compile(export_all).
-include_lib("stdlib/include/ms_transform.hrl").
-include("data_rec.hrl").
test_ets(Num) ->
lists:foreach(
fun({F,Title, Args}) when Title =:= [] ->
apply(?MODULE, F, [Args]);
({F,Title, Args}) ->
@ojii
ojii / example.html
Created January 12, 2011 15:39
example settings.py for the django CMS
{% load cms_tags %}
<!doctype html>
<head>
<title>{{ request.current_page.get_title }}</title>
{% plugins_media %}
</head>
<body>
{% placeholder "main" %}
</body>
@dreid
dreid / dialysis
Created August 10, 2011 20:52
first pass at a shell script to make building dialysis plts easier to use.
#!/bin/sh
OTP_VERSION=$(erl -noinput \
-noshell \
-eval 'io:fwrite(erlang:system_info(otp_release)).' \
-s init stop)
PLT_DIR="$HOME/.dialyzer/${OTP_VERSION}"
CURRENT_APP=$(basename $(pwd));
@troter
troter / mercurial-introduction.rst
Created October 30, 2011 09:51
SCMBC #2 Mercurial入門セッション資料(のたたき台) move to https://bitbucket.org/troter/scmbc-2011.11-mercurial-introsession

Mercurial 入門セッション資料

この資料について

  • SCMBC #2 Mercurial 入門セッション資料(のたたき台)です。
  • TODO たとえ話募集中

(おまけ)分散バージョン管理全般の利点

@ksauzz
ksauzz / FizzBuzz.java
Created November 9, 2011 10:08
Fizz Buzz
// fizzbuzz without if statement and % operator.
class FizzBuzz {
public static void main (String [] args) {
for(int i=1; i<100; i++){ test(i); }
}
private static void test(int num) {
System.out.println(num+":"+bark(isMultiple(num)));
}
@shirou
shirou / __init__.py
Created December 26, 2011 15:48
sphinx websupport with NGRAM search on heroku
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#### sphinx part. same as build.py
from sphinx.websupport import WebSupport
from sphinx.websupport.errors import DocumentNotFoundError
from sphinx.websupport.search import whooshsearch
from sphinx.websupport.storage.sqlalchemystorage import SQLAlchemyStorage
@keikubo
keikubo / README.md
Created March 20, 2012 01:38
Nginx + Unicorn for Rails on Rackhub

Nginx + Unicorn for Rails on Rackhub

Description:

This script enables you to launch your Rails application in production environment (port:80) with Nginx and Unicorn.

Installation:

Please make sure that your Gemfile in your rails application includes unicorn.

@matope
matope / NoSQLデータモデリング技法.markdown
Created April 16, 2012 03:35
NoSQLデータモデリング技法

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う