Skip to content

Instantly share code, notes, and snippets.

public class RedisClient {
private JedisPool pool;
@Inject
public RedisClient(Settings settings) {
try {
pool = new JedisPool(new JedisPoolConfig(), settings.get("redis.host"), settings.getAsInt("redis.port", 6379));
} catch (SettingsException e) {
// ignore

Project

Description: What does this project do and who does it serve?

Project Setup

How do I, as a developer, start working on the project?

  1. What dependencies does it have (where are they expressed) and how do I install them?
  2. How can I see the project working before I change anything?
@ryu1
ryu1 / README.md
Last active August 29, 2015 14:01

Project

Description: What does this project do and who does it serve?_

Requirements

Project Setup

How do I, as a developer, start working on the project?

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage

using System;
using System.Collections.Concurrent;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace FileCombiner
{
class Program
#!/bin/bash
#
# /etc/init.d/storm-nimbus
#
# Startup script for storm-nimbus
#
# chkconfig: 2345 20 80
# description: Starts and stops storm-nimbus
#. /etc/init.d/functions
stormBin=/home/user/storm/storm-0.8.1/bin/storm
@ryu1
ryu1 / lib.js
Created November 18, 2015 01:50
This is generic library of javascript.
// String.prototype.format() - 文字列フォーマット
//
// Example:
// var hello = 'Hello, {0}!'.format('world');
// console.log(hello); // Hello, world!
//
// var profile = 'name: {name}, age: {age}'.format({
// name: 'phi',
// age: '27',
// });

サバクラ両方で動く 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 アーキテクチャを実現した。

#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Note: Requires https://github.com/skarab/pika/tree/rabbitmq-ext
# for RabbitMQ exchange binding extensions
import csv
import getopt
import os
import random
import sys
import time
<?php
class Asset_Instance extends Fuel\Core\Asset_Instance {}
class Cache_Handler_Json extends Fuel\Core\Cache_Handler_Json {}
class Cache_Handler_Serialized extends Fuel\Core\Cache_Handler_Serialized {}
class Cache_Handler_String extends Fuel\Core\Cache_Handler_String {}
class Cache_Storage_Apc extends Fuel\Core\Cache_Storage_Apc {}
abstract class Cache_Storage_Driver extends Fuel\Core\Cache_Storage_Driver {}
class Cache_Storage_File extends Fuel\Core\Cache_Storage_File {}
class Cache_Storage_Memcached extends Fuel\Core\Cache_Storage_Memcached {}