Skip to content

Instantly share code, notes, and snippets.

View ezaurum's full-sized avatar
🏠
Working from home

Cho seokgyu ezaurum

🏠
Working from home
View GitHub Profile
@ezaurum
ezaurum / gist:076f5d7af2d140f71c22
Created June 1, 2014 10:48
99 bottles of beer
while(True):
for i in range(99, 3, -1):
print("%s bottles of beer on the wall, %s bottles of beer."%(i, i))
print("Take one down and pass it around, %s bottles of beer on the wall."%(i-1))
print ("2 bottles of beer on the wall, 2 bottles of beer.\nTake one down and pass it around, 1 bottle of beer on the wall.\n1 bottle of beer on the wall, 1 bottle of beer.\nTake one down and pass it around, no more bottles of beer on the wall.\nNo more bottles of beer on the wall, no more bottles of beer.")
@ezaurum
ezaurum / Test
Created February 4, 2015 15:01
Exception Test
class Test
{
private static Dictionary<HTTPProtocolID, Uri> _makeUri = HTTPProtocolUri.MakeUri(Host);
}
public static class HTTPProtocolUri
{
public static Dictionary<int, Uri> MakeUri()
{
return new Dictionary<int, Uri>
@ezaurum
ezaurum / gist:746ea24220b52b27b56c
Created February 16, 2015 05:15
await/async run test
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
internal class Program
{
private static ConcurrentQueue<int> _a = new ConcurrentQueue<int>();
@ezaurum
ezaurum / CharacterController
Created April 12, 2015 11:03
UnityTouchAndMouseMove
using UnityEngine;
namespace PhotonTest
{
public class CharacterController : MonoBehaviour
{
private Vector3 _destination;
private RaycastHit _raycastHit;
private Vector3 _touch;
public float MoveSpeed;
@ezaurum
ezaurum / xml2db.py
Created September 11, 2015 04:14
Xml file insert to DB
import postgresql.driver as pg_driver
import xml.etree.ElementTree as etree
import sys
__author__ = 'ezaurum'
type_map = {'PlayerSpawnPoint': 0, 'Gathering': 1, 'NPC': 2}
xml_file_name = sys.argv[1]
tree = etree.parse(open(xml_file_name, 'r'))
@ezaurum
ezaurum / FacebookScript
Created December 10, 2015 14:58
facebook login script
using System.Collections.Generic;
using Facebook.Unity;
using UnityEngine;
/// <summary>
/// 페이스북 관련 스크립트
/// </summary>
public class FacebookScript : MonoBehaviour
{
private bool _fb;
#!/bin/bash
set -e
GVERSION="1.9.2"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directories already exist $GOROOT"
@ezaurum
ezaurum / gin-hello-world.go
Last active December 12, 2023 08:32
go gin / hello world
package main
import (
"github.com/gin-gonic/gin"
"net/http"
)
func main() {
r := gin.Default()
@ezaurum
ezaurum / docker-compose.yml
Created February 20, 2018 09:26
테스트용 도커 컴포즈
version: "3.1"
services:
db:
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: test1234
volumes:
- ./resources:/docker-entrypoint-initdb.d
package main
import "syscall/js"
func main() {
js.Global.Get("document").Call("getElementsByTagName","body").Index(0).Set("textContent","Hello! 세계!")
}