Skip to content

Instantly share code, notes, and snippets.

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',
// });
@ryu1
ryu1 / NSUserDefaults+Extension.h
Last active February 3, 2016 06:08
NSUserDefaults+Extension.m
//
// NSUserDefaults+Extension.h
//
// Created by Ryuichi Ishitsuka on 2016/01/29.
//
#ifndef NSUserDefaults_Extension_h
#define NSUserDefaults_Extension_h
@interface NSUserDefaults (Extension)
//
// NSMutableAttributedString+Extension.h
//
// Created by Ryuichi Ishitsuka on 2016/01/08.
//
#import <Foundation/Foundation.h>
@interface NSMutableAttributedString (Extension)

Layer

UI層

  • ユーザとの相互作用の境界となる層
  • アプリケーション層の一部なのか別個のレイヤなのか諸説あり
  • ユーザーに情報を提示して、ユーザーの操作やコマンドの解釈を担うレイヤー。 DDDでは、このレイヤーにビジネスロジックを組む込むことを皮肉を込めて「利口なUI」というアンチパターンとしており、避けるべきパターンである。

アプリケーション層

  • ドメインオブジェクトを操作することで、ソフトウェアが果たすべき仕事を実現する層
  • アプリケーションが行うことになっている仕事(ユースケース)を定義し、その仕事をドメインレイヤーのオブジェクトが解決するように指揮(orchestrate)するレイヤー。このレイヤーもビジネスロジックは含まず、実際の処理はドメインレイヤーに委譲して調整役を担う。
#!/bin/sh -x
rm -rf ~/Library/Developer/Xcode/DerivedData
rm -rf ~/Library/Developer/Xcode/Archives
rm -rf ~/Library/Developer/Xcode/DeveloperPortal*
rm -rf ~/Library/Developer/Xcode/DocumentationCache
rm -rf ~/Library/Developer/Xcode/Products
rm -rf '~/Library/Developer/Xcode/iOS DeviceSupport'
rm -rf ~/Library/Developer/XCPGDevices
rm -rf ~/Library/Developer/Shared/Documentation/DocSets
#!/bin/bash
head -n $3 $1 | tail -n $(($3 - $2 + 1))
#!C:/Perl/bin/perl
use strict;
use HTTP::Request::Common;
use LWP::UserAgent;
use Jcode;
############
# 初期設定 #
############
@ryu1
ryu1 / mklink-chrome.bat
Created November 27, 2017 17:19
ChromeのキャッシュをRAMディスクにシンボルリンクする