Skip to content

Instantly share code, notes, and snippets.

View r7kamura's full-sized avatar

Ryo Nakamura r7kamura

View GitHub Profile
@r7kamura
r7kamura / be_json_spec.rb
Created April 25, 2013 15:20
be_json_spec.rb
it "returns an array of resources" do
get "https://api.github.com/resource"
response.body.should be_json([
{
"url" => /^https:/,
"id" => /^\d+$/,
"description" => /gist/,
"public" => true,
"user" => Hash,
"files" => Hash,
#include <GLUT/glut.h>
void display(void);
// $ cc -framework GLUT window.c
// $ ./a.out
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutCreateWindow("Hello, world!");

Restaurant

Restaurant serves RESTful API on Rails.

Installation

$ rails g doorkeeper:install
$ rails g doorkeeper:migration
$ rake db:migrate

Restaurant

Restaurant serves RESTful API on Rails.

Features

Controller

Restaurant provides controller-less & RESTful API. All controllers and routings will be auto-defined from your config/roles.yml definition.

Restaurant

Restaurant serves your data via auto-defined RESTful API on your rails application.

Install

# Gemfile
gem "restaurant"

# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
digraph {
builder -> build_queue [label="fetch job"];
builder -> event_queue [label="push event"];
builder -> stdout_queue [label="push STDOUT"];
api_server -> build_queue [label="push job"];
api_server -> db [label="store job info"];
scheduler -> api_server [label="trigger job"];
@r7kamura
r7kamura / altria.dot
Last active December 30, 2015 22:49
digraph {
graph [ ranksep=2.0; ]
job_worker -> queue [label="push event"];
job_worker -> queue [label="fetch job"];
job_worker -> queue [label="push log"];
api_server -> queue [label="push job"; weight=10];
api_server -> db [label="query job"];

Qchan API

Provides Public API of Qchan.

Qchan is a project of a Job-Queue Worker System. It consists of a cluster of many processes and Qchan API is a member of them. Qchan API has a responsibility to provide Public REST API to the Qchan's internal processes and the other external clients via HTTP.

Qchan API

Provides Public API of Qchan.

Qchan is a project of a Job-Queue Worker System. It consists of a cluster of many processes and Qchan API is a member of them. Qchan API has a responsibility to provide Public REST API to the Qchan's internal processes and the other external clients via HTTP.

Qchan API

Provides Public API of Qchan.

Qchan is a project of a Job-Queue Worker System. It consists of a cluster of many processes and Qchan API is a member of them. Qchan API has a responsibility to provide Public REST API to the Qchan's internal processes and the other external clients via HTTP.