Skip to content

Instantly share code, notes, and snippets.

View CenoX's full-sized avatar

CenoX CenoX

View GitHub Profile
@CenoX
CenoX / omnisharp.json
Created November 4, 2022 01:55
VS Code C# Format
{
"FormattingOptions": {
"NewLine": "\n",
"UseTabs": false,
"TabSize": 2,
"IndentationSize": 2,
"SpacingAfterMethodDeclarationName": false,
"SpaceWithinMethodDeclarationParenthesis": false,
"SpaceBetweenEmptyMethodDeclarationParentheses": false,
"SpaceAfterMethodCallName": false,
@CenoX
CenoX / manual.md
Created August 28, 2021 09:59
IoT Hub에 기기 등록하기

IoT Hub에 기기 등록하기

참고 사이트

시작 사항

  • 리소스 만들기를 통해 새 IoT Hub 서비스 생성
  • IoT 허브에 접근하여, IoT Edge를 눌러 접근
  • IoT Edge 디바이스 추가를 눌러 '대칭키'를 선택하고, 자동 키 생성을 통해 키 생성
@CenoX
CenoX / httpd_os_xcs.conf
Created January 17, 2021 06:40
Run Xcode Server on HTTP
# This is the default Xcode Server Apache configuration file.
# This file supports Apache 2.4 running in macOS.
# This configuration allows you run Xcode Server on *:80/xcode on your machine
# which is useful when you run Xcode Server on reverse proxy.
<VirtualHost *:80>
<IfModule !mod_deflate.c>
LoadModule deflate_module libexec/apache2/mod_deflate.so
</IfModule>
@CenoX
CenoX / apimanager.swift
Created March 2, 2020 10:22
본인이 쓰는 APIManager 구조
typealias APICompletionHandler<T: Decodable> = ((Result<T, Error>) -> Void)
typealias ResultT<T> = (Result<T, Error>)
final class APIManager {
public static let shared = APIManager()
// TEMP URL!!!
private let stringURL = "https://api.cenox.co"
private let baseURL: URL
@CenoX
CenoX / nanum-font-install.sh
Created November 2, 2019 22:10 — forked from lesstif/nanum-font-install.sh
JAVA_HOME 의 fonts/fallback 디렉터리에 나눔 폰트 설치. Confluence 의 편집 macro 에서 한글 깨짐 방지
#!/bin/sh
if [ "$#" -lt 1 ]; then
echo -e "$# is Illegal number of parameters.\n"
echo -e "Usage: $0 confluence-installed-dir\n"
echo "Example: $0 /var/atlassian/atlassian-confluence-6.7.0"
exit 1
fi
CONF_DIR=$1
@CenoX
CenoX / VersionManager.swift
Created February 18, 2019 06:36
Simple version manager(?) for iOS App.
import UIKit
/// Struct that contains current version and all past versions.
struct AppVersion: Codable {
var currentVersion: String
var pastVersions: [String]
}
class VersionManager {
@CenoX
CenoX / start-vpn-focal.sh
Last active May 20, 2020 05:11 — forked from kordless/start-vpn.sh
VPN Server for Google Cloud
#!/bin/bash
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1)
SERVER_NAME=vpn-$NEW_UUID
gcloud compute instances create $SERVER_NAME \
--machine-type "e2-micro" \
--image-family ubuntu-2004-lts \
--image-project "ubuntu-os-cloud" \
--boot-disk-size "10" \
--boot-disk-type "pd-ssd" \
--boot-disk-device-name "$NEW_UUID" \
@CenoX
CenoX / GyungdalTopRanker.swift
Created March 28, 2018 08:14
King-God-Emperor-ChungMuGong-Majesti-General-Development Master God GyungDal
enum Rank {
case top
case mid
case low
func whoIsHim() -> String {
if self == .top { return "GyungDal" }
return "I don't know"
}
}
@CenoX
CenoX / TSS.swift
Created March 28, 2018 08:13
TSS API Sample in Swift
//
// main.swift
// TSSAPI
//
// Created by CenoX on 2018. 1. 12..
// Copyright © 2018년 CenoX. All rights reserved.
//
import Foundation
import Dispatch
@CenoX
CenoX / UILoadingAlertController.swift
Created March 28, 2018 04:37
UIAlertController에 스피너 박기
class UILoadingAlertController: UIAlertController {
var activityIndicator: UIActivityIndicatorView!
let activityRect: CGRect = CGRect(x: 116, y: 60, width: 40, height: 40)
var isShowing: Bool = false
override func viewDidLoad() {
super.viewDidLoad()
activityIndicator = UIActivityIndicatorView(frame: activityRect)