Skip to content

Instantly share code, notes, and snippets.

View localghost666's full-sized avatar

localghost666

  • cyberspace
View GitHub Profile
@localghost666
localghost666 / findIndexKo.js
Created July 25, 2019 04:17
한글 문자열의 사전적 인덱스 찾기
function findIndexKo(word) {
var koRegex = /[\u3131-\u314e|\u314f-\u3163|\uac00-\ud7a3]/g; // [ㄱ-ㅎ|ㅏ-ㅣ|가-힣]
if (!koRegex.test(word)) {
// 매개변수가 한글이 아닌 경우
return -1;
}
if (word >= "가" && word < "나") {
return "가";
} else if (word >= "나" && word < "다") {
return "나";
@localghost666
localghost666 / PaginationModel.java
Created August 4, 2019 13:03
게시판 등의 페이지 처리를 위한 모델.
/**
* 게시판 등의 페이지 처리를 위한 모델. 목적 데이터의 전체 건수를 조회해 setTotalRows(rows)하고 calculate()해야 한다.
*
*/
public class PaginationModel {
/** 현재 페이지 번호 */
private Integer currentPage;
/** 한 페이지당 게시되는 게시물 수 */
private Integer rowsPerPage;
@localghost666
localghost666 / KarabinerElementsKoreanPcKeyboard.json
Created August 26, 2021 15:07
Karabiner-Elements Rules for Korean Windows Keyboard
{
"title": "KarabinerElementsKoreanPcKeyboard",
"maintainers": [],
"rules": [
{
"description": "Windows 키와 왼쪽 Alt 키 자리 교체",
"manipulators": [
{
"type": "basic",
"from": {