Skip to content

Instantly share code, notes, and snippets.

View msroz's full-sized avatar
🏄‍♂️
Chilling out

msroz msroz

🏄‍♂️
Chilling out
  • free
  • Japan
View GitHub Profile

サバクラ両方で動く JavaScript の大規模開発を行うために

原文:Scaling Isomorphic Javascript Code (This is just for study, please contact me at tily05 atmark gmail.com if any problem.)

考えてみれば Model-View-Controller とか MVC ってよく聞くよね。実際どんなものか知ってる? 抽象的に言うなら「オブジェクト情報の保持されるグラフィック・システム (つまり、ラスターではないグラフィック。ゲームとか) 上に構築された、表示系を中心としたアプリケーションにおいて、主要な機能どうしの関わりをうまく分離すること」とでも言おうか。もう少し深く考えを押し進めてみれば、これは当然、他のさまざまなアプリケーションにもあてはまる言葉 (bucket term ?) だ。

過去に多くの開発コミュニティが MVC による解決案を提供し、それによってよくあるユースケースにうまく対処し、地位を築くことができた。例をあげるなら、Ruby や Python コミュニティは Rails や Django を作り、MVC アーキテクチャを実現した。

@msroz
msroz / jade-ftw.md
Last active August 29, 2015 14:07 — forked from japboy/jade-ftw.md

Jade FTW

こんにちは。今回は現実逃避を兼ねて Jade の素晴らしさをお伝えしたいと思います。

Jade とは何か

[Jade][0] は JST (JavaScript Templates) の一つであり、HTML を書くための[軽量マークアップ言語][1] である [Haml][2] に影響を受けた JavaScript テンプレートエンジンでもあります。

@msroz
msroz / 00_image_info.pl
Last active August 29, 2015 14:13
Image::Info#imgage_info
#!/usr/bine/env perl
use v5.20.1;
use warnings;
use Image::Info qw/image_info/;
use Data::Dumper;
use Text::ASCIITable;
my @images = qw{
img/jpeg.jpeg
img/gif.gif
require "tempfile"
class Editor
def self.edit(template = nil) # : String
f = Tempfile.new("hoge")
f.puts "hoge"
f.close
system "vim #{f.path}"
puts File.read f.path
@msroz
msroz / license-badges.md
Created June 16, 2017 23:33 — forked from lukas-h/license-badges.md
License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • Badges are made with Shields.io.
  • This badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.  
  • 🇫🇷 Cette liste en français
@msroz
msroz / puma.sh
Created November 6, 2017 01:44 — forked from ktaragorn/puma.sh
#! /bin/sh
### BEGIN INIT INFO
# Provides: pumacontrol
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Puma web server
@msroz
msroz / gist:fa97847be9c4bba3eec90776ea539697
Created November 28, 2017 07:48 — forked from hironomiu/gist:189c5304e34b5893ad31
Treasure2016:DB トランザクション&ロック初級(公開版)

トランザクション&ロック初級

本演習はDatabase:testを用いて行うこと。演習では2つのターミナルで各々mysql clientでDatabase:testに接続すること。

タイムスケジュール目安(122分)

演習:自動コミット(演習分)(解説2分)
演習:手動コミット(commit編)(演習5分)(解説2分)
演習:手動コミット(rollback編)(演習5分)(解説2分)
演習:悲観ロック(SELECT FOR UPDATE)(演習5分)(解説2分)
演習:ロック(一般的なINSERT、UPDATE)(演習5分)(解説2分)
Question ロストアップデート対策(回答15分)(解説5分)

syntax = 'proto3';
message User {
string first_name = 1;
string last_name = 2;
}
require 'active_hash'
require 'awesome_print'
require 'graphql'
class Category < ActiveHash::Base
include ActiveHash::Associations
fields :title, :body, :posts, :featured
has_many :posts
require 'msgpack'
require 'base64'
require 'awesome_print'
-> {
#
# Serialize Image
# - MessagePack
# - Base64
#