Skip to content

Instantly share code, notes, and snippets.

View giginet's full-sized avatar
🌴
年中On vacation

Kohki Miki giginet

🌴
年中On vacation
View GitHub Profile
sys = require 'sys'
exec = (require 'child_process').exec
FILENAME = 'game' # write your game title.
FILES = [
'src/main.coffee',
'src/player.coffee',
# write sourcecodes here.
]
function! Cake()
if filereadable('Cakefile')
call system("cake compile") | cwindow | redraw!
else
silent CoffeeMake! -cb | cwindow | redraw!
endif
endfunction
noremap <C-c> :call Cake()<CR>
#!/usr/bin/env node
reporter = require('nodeunit').reporters.default
reporter.run(['test/test_calc.coffee',])
exports.testCalc = {
setUp : (callback) ->
@x = 10
@y = 20
callback()
tearDown : (callback) ->
callback()
testSum : (test) ->
sum = @x + @y
test.equal(sum, 30)
http = require('http')
class Server
constructor : (port) ->
http.createServer (req, res) ->
res.writeHead 200, {'Content-Type', 'text/plain'}
res.end "Hello, World!"
.listen port
console.log "Server is running at localhost:#{port}."
new Server(12345)
brew install mercurial
brew install sdl
brew install sdl_image
brew install sdl_mixer
brew install sdl_ttf
brew install smpeg
brew install portmidi
pip install hg+http://bitbucket.org/pygame/pygame
# -*- coding: utf-8 -*-
#
# shorten.py
# created by giginet on 2012/04/18
#
from urllib import quote
from urllib2 import Request, HTTPError, urlopen
import json
API_URL = u'https://www.googleapis.com/urlshortener/v1/url'
-*- coding: utf-8 -*-
print u'こんにちはこんにちは!'
enchant()
class Shooting extends Game
config : {
WIDTH : 640,
HEIGHT : 480,
FPS : 30
}
constructor : ->
super @config.WIDTH, @config.HEIGHT
@fps = @config.FPS
require 'formula'
class Hub < Formula
url 'https://github.com/defunkt/hub/tarball/v1.10.1'
homepage 'https://github.com/defunkt/hub#readme'
head 'https://github.com/defunkt/hub.git'
md5 'd3ff9bcf489466a408020867b77f1d4d'
def install
system "rake", "install", "prefix=#{prefix}"