Skip to content

Instantly share code, notes, and snippets.

View junho85's full-sized avatar
💭
Working

JunHo Kim (김준호) junho85

💭
Working
View GitHub Profile
@junho85
junho85 / 3key-mapping-cvx.yaml
Last active February 13, 2024 14:04
cmd-x,c,v and move tab
# ./ch57x-keyboard-tool upload < 3key-mapping-cvx.yaml
# ./ch57x-keyboard-tool --address 2:8 upload < 3key-mapping-cvx.yaml
orientation: normal
rows: 1
columns: 3
knobs: 1
layers:
- buttons:
@junho85
junho85 / inputsource_aurora.lua
Created June 1, 2023 14:42
inputsource_aurora.lua
local boxes = {}
local box_height = 23
local box_alpha = 0.35
local GREEN = hs.drawing.color.osx_green
-- 입력소스 변경 이벤트에 이벤트 리스너를 달아준다
hs.keycodes.inputSourceChanged(function()
local inputSource = {
english = "com.apple.keylayout.ABC",
korean = "com.apple.inputmethod.Korean.2SetKorean",
{
"title": "한글키보드",
"maintainers": [
"junho85"
],
"rules": [
{
"description": "한자키",
"manipulators": [
{
@junho85
junho85 / secret_map.js
Created October 16, 2018 15:30
비밀지도 javascript
function solution(n, arr1, arr2) {
var answer = [];
for (var i=0; i<n; i++) {
var result_arr = arr1[i] | arr2[i];
answer.push(result_arr.toString(2).padStart(n, '0').replace(/1/g, '#').replace(/0/g, ' '));
}
return answer;
}
@junho85
junho85 / ps3-cache.py
Created September 14, 2018 15:17
ps3-cache.py
from collections import deque
def solution(cacheSize, cities):
answer = 0
q = deque(maxlen=cacheSize)
for item in cities:
item = item.lower()
if item in q:
@junho85
junho85 / ps2-dart-game.py
Created September 13, 2018 15:05
PS2 - 다트게임 - 2018 KAKAO BLIND RECRUITMENT
import re
def multiple(str):
if str == 'S':
return 1
elif str == 'D':
return 2
else: # T
return 3
@junho85
junho85 / ps1-secret-map.py
Last active October 3, 2018 12:53
PS - 비밀지도 - 2018 KAKAO BLIND RECRUITMENT
# Python3
def solution(n, arr1, arr2):
answer = []
for idx in range(n):
result_arr = arr1[idx] | arr2[idx]
# answer.append(bin(result_arr)[2:].zfill(n).replace('1', '#').replace('0', ' '))
answer.append(format(result_arr, 'b').zfill(n).replace('1', '#').replace('0', ' '))
@junho85
junho85 / turn.py
Created August 19, 2018 05:22
turn.py
from typing import List
from .core.cards import Card
from .player import Other
def bet(
my_chips: int,
my_cards: List[Card],
bet_players: List[Other],
betting_players: List[Other],
@junho85
junho85 / dht11.ino
Last active May 17, 2018 03:47
arduino dht11
#include <SimpleDHT.h>
int pinDHT11 = 2;
SimpleDHT11 dht11;
void setup() {
Serial.begin(9600);
}
void loop() {
@junho85
junho85 / .bashrc
Created February 12, 2018 02:17
.bashrc word jump bindkey
bindkey -e
bindkey '^[[1;9C' forward-word
bindkey '^[[1;9D' backward-word