Skip to content

Instantly share code, notes, and snippets.

View qb20nh's full-sized avatar
💭
I may be slow to respond.

Yoo Taejong qb20nh

💭
I may be slow to respond.
  • 12:05 (UTC +09:00)
View GitHub Profile
@qb20nh
qb20nh / rps.js
Created December 7, 2021 13:19
RPS.js
let com = Math.random()*3 | 0
let usr
const rps = 'rock paper scissors'.split(' ')
const score = 'draw win lose'.split(' ')
let usrNum
while ((usrNum = rps.indexOf(usr = prompt('choose your move'))) === -1) {
alert('invalid move')
@qb20nh
qb20nh / Pagination.java
Created December 6, 2021 13:44
Java Pagination Example
package kr.co.benew.util;
import java.util.List;
import org.apache.ibatis.session.RowBounds;
import lombok.Getter;
import lombok.Setter;
@Getter
@Setter
public class Pagination<T> {
@qb20nh
qb20nh / ValueExample.java
Created October 20, 2021 11:03
Automatically fix hangul encoding
import java.io.UnsupportedEncodingException;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ValueExample {
@qb20nh
qb20nh / app.js
Created September 27, 2021 14:50
FizzBuzz
const testFizzBuzz = (fizzbuzz) => {
const assert = (value) => {
if (value === true) {
return;
} else {
throw 'Assertion failed';
}
};
const input = [ ...Array(15).keys() ].map(e=>e+1);
@qb20nh
qb20nh / search-anywhere.user.js
Created December 6, 2019 04:57
Search Anywhere
// ==UserScript==
// @name Search Anywhere
// @namespace http://tampermonkey.net/
// @version INITIAL
// @description Press Alt+D to activate search function within a webpage, Press Alt+D,D(Double Tap) for default browser behavior.
// @author tez
// @include http://*/*
// @include https://*/*
// @grant none
// ==/UserScript==