Skip to content

Instantly share code, notes, and snippets.

View geta6's full-sized avatar

geta6 geta6

View GitHub Profile
enum {
UIButtonColorsTan,
UIButtonColorsBlack,
UIButtonColorsGreen,
UIButtonColorsOrange,
UIButtonColorsBlue,
UIButtonColorsWhite,
UIButtonColorsGrey
};
@geta6
geta6 / index.html
Last active December 12, 2015 07:39
Public以下に配置するとなぜか動くっぽい、よくわからん
<!DOCTYPE html>
<html>
<head>
<title>RESTEST</title>
<link rel='stylesheet' href='http://yui.yahooapis.com/3.8.1/build/cssreset/cssreset-min.css'>
<style>
html {
font:12px monospace;
background: #FBFBFB;
}
@geta6
geta6 / npmlink
Created February 21, 2013 03:19
link all npm modules in package.json
@geta6
geta6 / cluster.coffee
Created February 24, 2013 15:28
node.jsのclusterについて
# 全プロセスで共通して実行される
os = require 'os'
http = require 'http'
cluster = require 'cluster'
# 親プロセス起動時に一回だけ呼ばれる
if cluster.isMaster
console.log 'starting...'
# 起動したosのcpuのスレッド数を求める
@geta6
geta6 / app.coffee
Created March 19, 2013 06:28
socket.ioのpingテスト用
fs = require 'fs'
path = require 'path'
app = require('http').createServer (req, res) ->
res.writeHead 200, 'Content-Type': 'text/html'
res.end fs.readFileSync (path.resolve 'public', 'index.html'), 'utf-8'
app.listen 3000
require('socket.io').listen(app).on 'connection', (socket) ->
stat = 0
try
json = JSON.parse process.argv[2]
unless json.length is 2
throw (new Error 'short length')
catch e
console.error e
stat = 1
{print} = require 'util'
for i in [1...101]
fizz = i % 3 is 0
buzz = i % 5 is 0
print 'Fizz' if fizz
print 'Buzz' if buzz
print i if !fizz and !buzz
print '\n'
{
"color_scheme": "Packages/Color Scheme - Default/Smyck.tmTheme",
"font_face": "Yutapon",
"font_size": 11.0,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"rulers":
--prefix=/usr/local
--http-client-body-temp-path=/usr/local/tmp/nginx/client
--http-proxy-temp-path=/usr/local/tmp/nginx/proxy
--http-fastcgi-temp-path=/usr/local/tmp/nginx/fastcgi
--conf-path=/usr/local/etc/nginx/nginx.conf
--pid-path=/usr/local/var/run/nginx.pid
--http-log-path=/usr/local/var/log/nginx/access.log
--error-log-path=/usr/local/var/log/nginx/error.log
--with-http_dav_module
--with-http_mp4_module
upstream favorymous {
server 127.0.0.1:3032;
}
server {
listen 80;
charset UTF-8;
server_name favorymous.com;
root /var/www/com.favorymous.www/public;