Skip to content

Instantly share code, notes, and snippets.

@544
544 / file0.txt
Created March 13, 2015 05:23
xcode で cocos2dx のアプリ開発する導入 ref: http://qiita.com/544/items/f04147a83c91bfa91016
$ cocos new -l cpp -d ./ Jet
Running command: new
> Copy template into ~/Documents/repo/cocos2dx/Jet
> Copying cocos2d-x files...
> Rename project name from 'HelloCpp' to 'Jet'
> Replace the project name from 'HelloCpp' to 'Jet'
> Replace the project package name from 'org.cocos2dx.hellocpp' to 'org.cocos2dx.Jet'
> Replace the mac bundle id from 'org.cocos2dx.hellocpp' to 'org.cocos2dx.Jet'
> Replace the ios bundle id from 'org.cocos2dx.hellocpp' to 'org.cocos2dx.Jet'
71 var HelloWorldScene = cc.Scene.extend({
72 onEnter:function () {
73 this._super();
74 var layer = new HelloWorldLayer();
75 this.addChild(layer);
76 }
@544
544 / file0.txt
Last active August 29, 2015 14:10
nvmでnode.jsの環境をつくる。 ref: http://qiita.com/544/items/7237a32c68619236f446
[masato@mba] $ git clone git://github.com/creationix/nvm.git ~/.nvm
Cloning into '~/.nvm'...
remote: Counting objects: 2707, done.
remote: Total 2707 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (2707/2707), 514.38 KiB | 232.00 KiB/s, done.
Resolving deltas: 100% (1476/1476), done.
Checking connectivity... done.
@544
544 / file0.txt
Created December 7, 2014 09:09
perlでtwitterにアクセスしてみる。 ref: http://qiita.com/544/items/3ef0fd507055a30cfb9c
[masato@mba] $ sudo cpanm Net::Twitter
--> Working on Net::Twitter
Fetching http://www.cpan.org/authors/id/M/MM/MMIMS/Net-Twitter-4.01004.tar.gz ... OK
Configuring Net-Twitter-4.01004 ... OK
...
Successfully installed Net-Twitter-4.01004
9 distributions installed
[masato@mba] $
[masato@mba] $ sudo cpanm YAML
--> Working on YAML
Fetching http://www.cpan.org/authors/id/I/IN/INGY/YAML-0.98.tar.gz ... OK
Configuring YAML-0.98 ... OK
Building and testing YAML-0.98 ... OK
Successfully installed YAML-0.98
1 distribution installed
@544
544 / HelloWorldApp.scala
Created August 18, 2014 09:48
Scalaで手っ取り早くHelloWorld ref: http://qiita.com/544/items/2a8f4263a96cb11c46db
object HelloWorldApp extends App {
val name:String = if (args.length > 0) args(0) else "World";
println ("Hello %s".format(name))
}
HelloWorldApp.main(args)
@544
544 / SimpleClass.scala
Last active August 29, 2015 13:57
Scalaのクラスについて ref: http://qiita.com/544/items/774e9a0bfed5507fad14
/** class and instance sample */
class SimpleClass(id:String) {
// インスタンス化のタイミングで実行される。
println("create SimpleClass id:" + id)
// 補助コンストラクタ
def this() {
// 先頭で基本コンストラクタを呼び出す必要がある。
this("dummy");
println("create by sub contracter")
@544
544 / FizzBuzz.java
Last active August 29, 2015 13:57
JavaでFizzBuzzする環境を整える。 ref: http://qiita.com/544/items/b00d9a566100ca613b24
package test;
public class FizzBuzz {
public static void main(String[] args) {
String val = null;
for(int i=1; i<100; i++) {
if (i%15 == 0) {
val = "FizzBuzz";
} else if (i%3 == 0) {
val = "Fizz";
package test;
public Class Hoge {
     // test...
private String data;
public static void main(String[] args) {
System.out.println("hello world");
}
@544
544 / patchSqlTemplate.sql
Created April 29, 2011 08:22
データパッチを当てるときのSQLのテンプレート
SET ECHO ON
SET TIMING ON
SET PAGESIZE 2000
SET LINE 9999
SPOOL PATCHNAME_01_YYYYMMDD.LOG
/*---------------------------------------------------
|| 処理開始時刻
---------------------------------------------------*/
SELECT TO_CHAR (SYSDATE,'YYYY/MM/DD HH24:MI:SS') AS 開始時刻 FROM DUAL;