Skip to content

Instantly share code, notes, and snippets.

View nakosung's full-sized avatar

Nako Sung nakosung

  • NAVER, CLOVA AI
  • Seoul, Korea
View GitHub Profile
cc.Menu.extend = cc.Class.extend
MyItem = cc.MenuItemFont.extend
onEnter : ->
_was_selected = false
check = =>
_selected = @isSelected()
if _selected and not _was_selected
_was_selected = true
@selected_v2()
else if not _selected and _was_selected
cc.Menu.extend = cc.Class.extend
cc.MenuItemLabel.extend = cc.Class.extend
ZoomActionTag = 0x60c05002
MyItem = cc.MenuItemLabel.extend
onEnter : ->
_was_selected = false
check = =>
_selected = @isSelected()
http://www.bytearray.org/?p=118
export GATEWAY_IP=$(ip addr | awk '/global/ {print $2}' | sed -e "s/\/.*//g")
@nakosung
nakosung / docker-rmi-notag.sh
Created October 18, 2013 02:05
delete all images without tag
docker images | grep '<none>' | awk '{print $3}' | xargs docker rmi
{
"default": {
"description" : "mainstream",
"repo": "http://rd-mtft.redduck.com/_cdn",
"game_list": "http://rd-mtft.redduck.com/_cdn/games",
"websocket": "ws://rd-mtft.redduck.com/gateway"
},
"sbg" : {
"description" : "sbg(skyworker)",
"repo": "http://10.20.30.10/_cdn",
@nakosung
nakosung / setup.sh
Last active December 26, 2015 17:49
# public port
export WEBFRONTEND_PORT=6060
export GATEWAY_PORT=6061
export GIT_PORT=6062
export LOCAL_IP=$(ip addr show | grep eth0 | grep inet | awk '{print $2}' | sed -e 's/\/.*$//')
# install jq
if [ "$(uname)" == "Darwin" ]
then
wget http://stedolan.github.io/jq/download/osx64/jq
# ZooKeeper 3.4.5
docker run -d -name zk -p 2181:2181 paulczar/zookeeper-3.4.5 /opt/zookeeper-3.4.5/bin/zkServer.sh start-foreground
# Mongodb
docker run -d -name mongo -p 27017 damien/mongodb mongod
# redis
docker run -d -name redis srid/redis:2.6
# Enter your facebook or github app secret into db!
@nakosung
nakosung / trap.sh
Created November 27, 2013 02:15
trap!
#!/bin/bash
function clean_up {
# Perform program exit housekeeping
rm $TEMP_FILE
exit
}
trap clean_up SIGHUP SIGINT SIGTERM
input {
# Sample input over UDP
udp { format => "json" port => 9999 type => "rlog_udp" }
redis {
host => "10.20.7.34"
data_type => "list"
key => "logstash"
codec => json
}
}