Skip to content

Instantly share code, notes, and snippets.

View dora-gt's full-sized avatar

Taiga Nakayama dora-gt

View GitHub Profile
@dora-gt
dora-gt / Readme.md
Created November 21, 2011 04:01
How to make partial reference in Perl.

Perl での部分参照の作り方。

@dora-gt
dora-gt / comment.md
Created November 5, 2011 13:49
-> is omittable in Perl in some situations

The output may be like this:

value_2_1
value_2_1

It is because -> is omittable when it's between [ ] or { }.

@dora-gt
dora-gt / mac_commands.md
Created October 14, 2011 17:46
Useful commands on Mac OS X

Useful commands on Mac OS X

newsyslog

rotates log files (this is not only for Mac OS X).

open

opens file(s) or directory(es) on Finder. You can even specify the application with which you want to open the file.

@dora-gt
dora-gt / fizzbuzz.dart
Created October 14, 2011 07:42 — forked from VoQn/fizzbuzz.dart
Google が Dart 公開したから早速 FizzBuzz
main () {
var tmp = null;
for (var i=0;++i<101;) {
print ((tmp = (i%3?'':'Fizz')+(i%5?'':'Buzz')) == '' ? i : tmp);
}
}
@dora-gt
dora-gt / StringInterpolation.dart
Created October 13, 2011 17:10
samples of String interpolation with ${expression}
main () {
var age = 21;
var name = {"first":"taro","last":"yamada"};
print ("Happy birthday, ${name['first'].toUpperCase()}, you're ${age++} today.");
}
@dora-gt
dora-gt / README.markdown
Created September 16, 2011 16:00
How to install MongoDB 2.0 on Mac OS X (>= Leopard)

How to install MongoDB 2.0 on Mac OS X (>= Leopard)

Procedure

The whole install procedure is like the following.
You would have to do 7 steps.

  1. Download the latest tar file, and expand it.
  2. Move it to /usr/local/, and make a symbolic link to the folder.
  3. Add path to MongoDB binaries.
  4. Make an user that "mongod" runs on, and group that owns the user.