Skip to content

Instantly share code, notes, and snippets.

View goodmorningcody's full-sized avatar

Cody goodmorningcody

  • AI Startup
  • Seongnam, Republic of Korea
View GitHub Profile
{
"public_identifier": "codingcody",
"profile_pic_url": null,
"background_cover_image_url": null,
"first_name": "경옥",
"last_name": "윤",
"full_name": "경옥 윤",
"follower_count": 673,
"occupation": "소프트웨어 엔지니어 at Kakao Corp",
"headline": "I joined at kakao again. I am developing a story based game and undisclosed project.",
@goodmorningcody
goodmorningcody / AndroidManifest.xml
Last active August 5, 2019 06:02
Example AndroidManifest XML File To Extend Android Platform in Unity
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="{Insert Your Package Name}"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="preferExternal">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
@goodmorningcody
goodmorningcody / MyUnityPlayerActivity.java
Created August 5, 2019 05:59
Inherited from UnityPlayerActivity to extend Android Platform.
package com.kakaogames.android;
import android.os.Bundle;
import android.app.AlertDialog;
import android.content.DialogInterface;
import com.unity3d.player.UnityPlayerActivity;
public class MyUnityPlayerActivity extends UnityPlayerActivity
{
@Override protected void onCreate(Bundle savedInstanceState)
@goodmorningcody
goodmorningcody / complex-condition-problem-01.swift
Last active February 6, 2017 12:09
complex condition problem - 01
enum Type {
case 미국시민권자
case 미국영주권자
case 해당사항없음
case 미국이외조세목적상거주자
case 미국시민권자이면서미국이외
case 미국영주권자이면서미국이외
}
struct Tax {
@goodmorningcody
goodmorningcody / gist:7b1340322ddcf3cdbb3890c46ea69916
Created November 3, 2016 11:46
Xcode Automate Versioning Script with Git Revision Head
revisionString="$(git rev-parse HEAD)"
versionString="${revisionString:0:7}"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $versionString" "${PROJECT_DIR}/${INFOPLIST_FILE}"
func playWithAutomatic(number:Int) {
let app = XCUIApplication()
let numberButton = app.buttons["number"]
let fizzButton = app.buttons["fizz"]
let buzzButton = app.buttons["buzz"]
let fizzBuzzButton = app.buttons["fizzbuzz"]
for index in 0...number {
if index%15==0 {
fizzBuzzButton.tap()
@goodmorningcody
goodmorningcody / if_let_context.swift
Created April 30, 2016 18:39
스위프트 : if let 구문을 활용한 옵셔널 타입의 효과적인 조건 분기
let birthString = "1983년"
let currentString = "2015년"
if let birth = Int(birthString), let current = Int(currentString) {
let age = current - birth + 1
}
else {
print("나이 계산을 위해서는 정수값만 입력해야 합니다.")
}
@goodmorningcody
goodmorningcody / parameter_type_with_tuple.swift
Created April 24, 2016 05:33
스위프트 : 매개변수 타입으로의 튜플
func calcRectArea(rect:(width:Float, height:Float)) -> Float {
return rect.width*rect.height
}
calcRectArea((width:100, height:200))
@goodmorningcody
goodmorningcody / nested_function_with_capture.swift
Last active April 24, 2016 05:20
스위프트 : 중첩함수를 사용한 캡쳐링
func makeAddingClosure(start:Int)->(Int)->(Int) {
var total = start
func add(num:Int)->Int {
total = total + num
return total
}
return add
}
@goodmorningcody
goodmorningcody / omit_external_parameter_name.swift
Created April 23, 2016 10:48
스위프트 : 외부 매개변수명 생략하기
func add(value1:Int, _ value2:Int)->Int{
return value1+value2
}
add(10, 20)
add(20, 10)