Skip to content

Instantly share code, notes, and snippets.

View nacika-ins's full-sized avatar
:octocat:

nacika nacika-ins

:octocat:
View GitHub Profile
@mshibuya
mshibuya / rails_admin.ja.yml
Last active November 2, 2022 09:39
Japanese translation for RailsAdmin
ja:
admin:
js:
true: True
false: False
is_present: 存在する
is_blank: 空白
date: 日付 ...
between_and_: ... から ...
today: 今日
@mgng
mgng / FlashPlayerVer.js
Created March 19, 2012 01:54
Flashが使えるかどうかの判定js
function FlashPlayerVer() {
var flashplayer_ver = 0;
if(navigator.plugins && navigator.mimeTypes['application/x-shockwave-flash']){
var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
if(plugin){
flashplayer_ver = parseInt(plugin.description.match(/\d+\.\d+/));
}
} else {
try{
var flashOCX = new ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").match(/([0-9]+)/);
@seratch
seratch / readme.md
Created May 18, 2012 00:51
Finagle Developer Guide (December 15, 2011 Draft) の適当な和訳

細かい点で間違いなどあるかと思います。fork して直していただけると助かります。

Finagle is built using sbt. We've included a bootstrap script to ensure the correct version of sbt is used. To build:

Finagle は sbt を使ってビルドしています。私たちは確実に適切なバージョンの sbt を使うようにブートストラップ用のスクリプトを含めています。このように実行します。

    $ ./sbt test

@j5ik2o
j5ik2o / gist:2970973
Last active June 6, 2024 14:24
ペアプロの心得

ペアプロの心得

休憩をとる

1.定期的に休憩をとっていますか? ペアプログラミングは、精神的な体力を消耗します。定期的に休憩をとってリフレッシュすることがとても大切です。

謙虚になる

2.「色々な実装方針がある」という認識がありますか?

@beans15
beans15 / currentDir.scala
Created March 31, 2013 14:44
[scala] カレントディレクトリを取得
val currentDir = new File(".").getAbsoluteFile().getParent()
@Mortimerp9
Mortimerp9 / Retry.scala
Last active July 3, 2022 22:35
A retry implementation for Scala, a bit of explanations here: http://pierreandrews.net/posts/retry-fail-scala.html
import scala.concurrent.Await
import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.concurrent.blocking
import scala.concurrent.duration.Deadline
import scala.concurrent.duration.Duration
import scala.concurrent.duration.DurationInt
import scala.concurrent.duration.DurationLong
import scala.concurrent.future
import scala.concurrent.promise
@bugcloud
bugcloud / ViewController.h
Created August 19, 2013 13:36
[iOS] Facebook SDKのSSOボタンをローカライズする ref: http://qiita.com/bugcloud/items/a61a5a43fb8a601b850d
//
// ViewController.h
// FBSample
//
#import <UIKit/UIKit.h>
#import <FacebookSDK/FacebookSDK.h>
@interface ViewController : UIViewController <FBLoginViewDelegate>
@end
@doi-t
doi-t / setting_default_value.bash
Last active April 2, 2023 11:35
シェル変数のデフォルト値を設定する
#!/bin/bash
foo=${1:-hoge}
echo $foo #$1がなかったらhogeをデフォルト値としてfooに代入する
#var自身にデフォルト値としてhogeを代入としたいので以下のように書きたい
${var:=hoge} #このままでは、hogeが展開されてしまって、hogeなんてコマンドはないとシェル怒られる
echo "1:$var"
var=
@yunano
yunano / consul
Last active October 7, 2022 18:58
/etc/init.d/consul for CentOS 6
#!/bin/sh
#
# consul - this script manages the consul agent
#
# chkconfig: 345 95 05
# processname: consul
### BEGIN INIT INFO
# Provides: consul
# Required-Start: $local_fs $network
@sonots
sonots / out_forward.conf
Last active November 2, 2021 06:14
ログの欠損をできるだけ避ける Fluentd の out_forward 設定サンプル cf. http://blog.livedoor.jp/sonots/archives/44690980.html
<source>
type in_tail
# ...
tag raw.eventlog
</source>
<match raw.**>
type forward
log_level "#{ENV['DEBUG'] ? 'debug' : 'info'}"