Skip to content

Instantly share code, notes, and snippets.

View jinwoo-lee-github's full-sized avatar

jinwoo-lee jinwoo-lee-github

View GitHub Profile
pipeline {
agent none
stages {
stage('UPDATE')
{
parallel {
stage('window UPDATE') {
steps {
echo 'window update'
@jinwoo-lee-github
jinwoo-lee-github / add role
Last active April 23, 2022 03:31
add role
var bot = Context.Guild.GetUser(0);
Log.Information(roleToSelect.Permissions.ToString());
if (bot.Roles.Contains(roleToSelect) == false)
{
Log.Debug("has permession");
await bot.AddRoleAsync(roleToSelect);
}
else
@jinwoo-lee-github
jinwoo-lee-github / gist:f822de26a807849167fc
Created February 20, 2015 03:12
convert string to enum
public class ATUtil
{
static public T GetEnum<T>(string name, T defaultValue)
{
string[] names = System.Enum.GetNames(typeof(T));
System.Array values = System.Enum.GetValues(typeof(T));
for (int i = 0; i < names.Length; ++i)
{
if (names[i] == name)
@jinwoo-lee-github
jinwoo-lee-github / editor window toolbar
Last active December 30, 2015 21:19
editor window toolbar
void OnGUI()
{
#region ToolBar
GUILayout.BeginHorizontal(EditorStyles.toolbar);
if (GUILayout.Button("Clear All", EditorStyles.toolbarButton))
{
@jinwoo-lee-github
jinwoo-lee-github / BuildScript.cs
Last active December 26, 2015 07:59
unity build menu
using UnityEngine;
using UnityEditor;
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
public class WhdvlBuilder {
static string[] Scenes = FindEnableEditorScenes();
@jinwoo-lee-github
jinwoo-lee-github / ATTouch.cs
Last active July 27, 2017 07:30 — forked from asus4/TouchToMouseConverter.cs
ATTouch for Unity ( mobile & editor)
/**
Converts Mobile Touch to the default Mouse Click
## invoked these method in Mobile too
OnMouseDown
OnMouseDrag
OnMouseUp
## only called in touch screen
@jinwoo-lee-github
jinwoo-lee-github / git_version
Created March 23, 2013 14:39
xcode version from git
INFO_PLIST="${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/Info"
GIT_VERSION=$(git --git-dir="${PROJECT_DIR}/.git" --work-tree="${PROJECT_DIR}/" rev-list master | wc -l)
GIT_VERSION=${GIT_VERSION// /}
MD_VERSION="1.05."
VERSION=$MD_VERSION$GIT_VERSION
defaults write $INFO_PLIST CFBundleVersion "$VERSION"
NSMutableString *aString = [NSMutableString string];
for (int i = 32; i < 55296; i++) {
if (!(i % 10)) [aString appendString:@"\n"];
[aString appendFormat:@"(%04X:%i)%C, ", i, i, i];
}
NSLog(aString);
@jinwoo-lee-github
jinwoo-lee-github / gist:5012001
Created February 22, 2013 09:20
git highlighting
git config --global color.diff auto
git config --global color.status auto
git config --global color.branch auto