Skip to content

Instantly share code, notes, and snippets.

View tomoyukiinoue's full-sized avatar

Tomoyuki INOUE tomoyukiinoue

  • Beartail
  • Japan, Tokyo, Shinagawa
View GitHub Profile
#Japanese messages
javax.validation.constraints.AssertFalse.message=Falseでなければなりません。
javax.validation.constraints.AssertTrue.message=Trueでなければなりません。
javax.validation.constraints.DecimalMax.message={value}以下でなければなりません。
javax.validation.constraints.DecimalMin.message={value}以上でなければなりません。
javax.validation.constraints.Digits.message=境界以外の数値(予測:<{integer} digits>.<{fraction} digits>)
javax.validation.constraints.Future.message=未来日付でなければなりません。
javax.validation.constraints.Max.message={value}以下でなければなりません。
javax.validation.constraints.Min.message={value}以上でなければなりません。
javax.validation.constraints.NotNull.message=Nullは許可されていません。
@timd
timd / gist:4953078
Last active December 13, 2015 18:08
Example of Kiwi test involving Magical Record and view controllers
#import "Kiwi.h"
#import "MyController.h"
#import "Record.h"
#import "MyModel.h"
// Category on class under test to expose private properties / methods
@interface MyController(MyTest)
@property (nonatomic, strong) NSDictionary *aDictionary;
@property (weak, nonatomic) IBOutlet UIButton *aButton;
[super viewWillAppear:animated];
NSManagedObjectContext *context = [NSManagedObjectContext MR_contextForCurrentThread];
// ここで、FEUnitはFEClanに対してclanというrelationを持っているとする
// FEClanはFEUnitに対してunitsというrelationを持っているとする
// NSManagedObjectIDで検索
// Property clanID must be permanent since a temporary ID cannot handle this query
self.fetchedResultsController = [FEUnit MR_fetchAllGroupedBy:nil
withPredicate:[NSPredicate predicateWithFormat:@"clan == %@", self.clanID]
@tune
tune / gist:3911829
Created October 18, 2012 13:34
C/C++言語 開発環境

Windows/Linuxで両方で動作する成果物を想定。 有償のツールは理解が得られる方が稀なので除外。

仕様書

外部仕様

Word/Excelが手軽だけど差分が追いにくい。 Markdown+PandocかSphinxでPDF提出がいいかな?

@hiroy
hiroy / PHPでのUTF-8-MAC対応例
Created June 28, 2012 03:42
MacからのファイルアップロードでNFDで正規化された日本語ファイル名をNFCでの正規化にnormalizeするサンプル
<?php
$name = $_FILES['inputname']['name'];
if (Normalizer::isNormalized($name, Normalizer::FORM_D)) {
$_FILES['inputname']['name'] = Normalizer::normalize($name, Normalizer::FORM_C);
}
@kkosuge
kkosuge / 都道府県.csv
Created December 13, 2011 10:07
都道府県.csv
北海道 青森県 岩手県 宮城県 秋田県 山形県 福島県 茨城県 栃木県 群馬県 埼玉県 千葉県 東京都 神奈川県 新潟県 富山県 石川県 福井県 山梨県 長野県 岐阜県 静岡県 愛知県 三重県 滋賀県 京都府 大阪府 兵庫県 奈良県 和歌山県 鳥取県 島根県 岡山県 広島県 山口県 徳島県 香川県 愛媛県 高知県 福岡県 佐賀県 長崎県 熊本県 大分県 宮崎県 鹿児島県 沖縄県
@tmd45
tmd45 / gist:1369167
Created November 16, 2011 03:34
MITライセンス表示文章の雛形(英語+日本語)
The MIT License
Copyright (c) {year} {copyright holders}
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH T
@henrydjacob
henrydjacob / users.yml
Created November 7, 2011 08:26
devise fixtures users.yml
user1:
email: user1@mysite.com
encrypted_password: <%= User.new.send(:password_digest, "user123") %>
confirmed_at: <%= Time.now %>
@mizchi
mizchi / app.coffee
Created June 28, 2011 21:29
express/coffeescript
# load libraries
require 'coffee-script'
mongoose = require 'mongoose'
express = require 'express'
step = require "step"
# about oauth
OAuth = require('oauth').OAuth
oauth = new OAuth(
'https://api.twitter.com/oauth/request_token',