This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f | grep -v ".git/" | xargs -Ixx file -i -N xx | sed -e 's/.\+\([\/\.][^\/^\.]\+\+\):/\1/g' |sort -u > .gitattributes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
SSH_CONFIG="$HOME/.ssh/config" | |
SSH_ENV="$HOME/.ssh/environment" | |
# start the ssh-agent | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
# spawn ssh-agent | |
ssh-agent | sed 's/^echo/#echo/' > "$SSH_ENV" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Minimal build.gradle for Lift project | |
apply { | |
plugin 'scala' | |
plugin 'war' | |
plugin 'jetty' | |
plugin 'eclipse' | |
} | |
scalaVersion = '2.9.2' | |
liftVersion = '2.5-M4' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>サンプル</title> | |
<script src="./meter.js"></script> | |
</head> | |
<body> | |
<p>180pxくらいの大きさで80%のメーターを表示する。</p> | |
<div id="meter"></div> | |
<script> | |
var _id = 'meter'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// はたと困ったのでテスト | |
// T[] arr=ArrayList<T>.toArray(T[]) | |
// で得られた配列arrをいじくるとどうなるんだったっけ? | |
// 予想では引数として与えた配列へ値がコピーされ、 | |
// 返却値は配列への参照となっているハズ。 | |
ArrayList<String> alist = new ArrayList<String>() | |
alist.add(0,'文字列1') | |
alist.add(0,'文字列2') | |
alist.add(0,'文字列3') | |
assert(alist.get(0)=='文字列3') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 久々に触ったJavaでこういうことをやってしまったと言う話 | |
public final class MyClassOne{ | |
private static final ArrayList<String> myList = new ArrayList<String>() | |
//-------^これがミス | |
public MyClassOne add(String str){ | |
myList.add(str) | |
return this | |
} | |
public int size(){ | |
myList.size() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
import static org.junit.Assert.*; | |
import org.junit.Test; | |
import com.sun.net.httpserver.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jp.eiya.aya.gson | |
public abstract class MyClass{ | |
private String id=null | |
private int value=0 | |
public MyClass(String i,int v){ | |
id=i | |
value=v | |
} | |
public String getID(){return id} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class 俺のクラス{ | |
public 俺のクラス(){ | |
} | |
public boolean 俺のメソッド(俺のクラス 俺の引数){ | |
return false | |
} | |
} | |
俺のクラス 俺のインスタンス = new 俺のクラス() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class Abs敵キャラ{ | |
String _name = "名無しさん" | |
@Override | |
public String toString(){ | |
return _name | |
} | |
} | |
interface Iマリオ行動 { | |
public Iマリオ行動 アイテムとる(Eアイテム アイテム) |