Skip to content

Instantly share code, notes, and snippets.

View 123jimin's full-sized avatar
🏠
Working from home

Jimin Park 123jimin

🏠
Working from home
View GitHub Profile
@123jimin
123jimin / sdclient.js
Last active July 29, 2023 20:49
StableDiffusion Client
class StableDiffusionClient {
constructor(fetch) {
this.fetch = fetch;
this.settings = {};
}
get width() { return this.settings.width || 768; }
get height() { return this.settings.height || 512; }
parse(prompt, preset_pos, preset_neg) {
@123jimin
123jimin / snake.py
Created February 15, 2023 09:49
Snake Puzzle Solver
from ortools.sat.python import cp_model
class SolverCallback(cp_model.CpSolverSolutionCallback):
def __init__(self, vars):
super().__init__()
self.example_solutions = list()
self.num_solutions = 0
self.max_keep_solutions = 100
self.max_show_solutions = 100
self.vars = vars
@123jimin
123jimin / adblockblockerbloker.js
Created December 30, 2015 07:32
SDVX.IN Adblock blocker blocker
// ==UserScript==
// @name SDVX.IN ADBLOCK BLOCKER BLOCKER
// @namespace http://0xF.kr/
// @version 0.1
// @description SDVX.IN Adblock blocker blocker
// @author JiminP
// @match http://sdvx.in/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
/*
0. Go to http://gabrielecirulli.github.io/2048/
1. Copy & Paste below 3 lines to the console.
2. Every time a move is done, a prompt will be opened.
3. Input two integers (separated by a slash), where
the first integer indicates the place where the tile will appear,
and the second integer indicates the type of the tile (2 or 4 only).
The place will be indicated by the index in the list of empty tiles (after the move),
where the first one is leftmost+upmost and the next one is below of the first one.
(For example, if every tiles are empty, then the tiles will have index 0 4 8 12 / 1 5 9 13 / 2 6 10 14 / 3 7 11 15.)
@123jimin
123jimin / pms_block.js
Last active February 28, 2019 07:36
A simple userscript for automatically closing KAIST PMS install page
// ==UserScript==
// @name KAIST PMS Blocker
// @namespace http://0xF.kr/
// @version 0.1
// @description Automatically closes PMS page
// @author JiminP
// @match http://143.248.113.1/CPopupRequest
// @grant none
// ==/UserScript==
@123jimin
123jimin / is_this_easy_mode.lua
Last active December 16, 2016 00:13
Is this easy mode? - The answer depends on your goal [Recursed custom map]
local metal = { ["7"] = "panel_ul", ["8"] = "panel_u", ["9"] = "panel_ur",
["4"] = "panel_l", ["5"] = "panel_c", ["6"] = "panel_r",
["1"] = "panel_dl", ["2"] = "panel_d", ["3"] = "panel_dr",
["<"] = "panel_fs", [">"] = "panel_bs",
E = "panel_k1", F = "panel_k2", B = "panel_k3",
o = "block", ["="] = "girder_h", ["|"] = "girder_v",
w = "warning", [":"] = "back", ["'"] = "back_d", ["-"] = "ledge" }
local black = { o = "black", ["<"] = "black_ul", [">"] = "black_ur",
s = "black_s", ["-"] = "black_ledge" }
@123jimin
123jimin / too_much_secure.lua
Created December 8, 2016 20:35
Too much secure - my first Recursed map!
local metal = { ["7"] = "panel_ul", ["8"] = "panel_u", ["9"] = "panel_ur",
["4"] = "panel_l", ["5"] = "panel_c", ["6"] = "panel_r",
["1"] = "panel_dl", ["2"] = "panel_d", ["3"] = "panel_dr",
["<"] = "panel_fs", [">"] = "panel_bs",
E = "panel_k1", F = "panel_k2", B = "panel_k3",
o = "block", ["="] = "girder_h", ["|"] = "girder_v",
w = "warning", [":"] = "back", ["'"] = "back_d", ["-"] = "ledge" }
function start()
ApplyTiles(metal, 0, 0, [[
@123jimin
123jimin / classify.js
Created August 24, 2016 10:39
KONAMI eAMUSEMENT Visual Verification Image Classifier
#!/usr/bin/env node
/*
Instruction
1. Download raw (100x100 png) image files.
2. Execute ./classify.js foo.png bar.png baz.png
3. The output is the concatenation of characters reperesenting classes of each images.
4. ...?
5. Profit!!!
태초에 가는 것이 교실 그렇게 말하기 전에 아이카는 내 자리에서 그에서 들어갔다.
"......으음......."
"--이런 목소리가 전혀 들었다.
"......."
그리고 그것을 한 순간....... 아무래도 하나를 보여진 후, 솔직히 본 시도는 그렇게 말했다.
"......하지만 근 상 인시는 시도는 고개를 하는 것이 이어진 한 가슴 확인이 그렇게 말하면서 말하면서 그렇지 않았다.
"그래도 고개를 돌렸다.
"이걸 보였다.
"--"어, 어, 아무리 시도의 목소리가 한 번 말을 그렇게 한 것 같았다.
"어서 자신의 분위기가 말하면서 그렇게 정령을 있는 것이 내밀었다.
@123jimin
123jimin / evalEq.php
Created July 11, 2013 09:07
The parser I made (100% hand-coded) back in 2011.
<?php
require_once('echoErr.php');
require_once('token.php');
require_once('complex.php');
require_once('constant.php');
require_once('function.php');
require_once('evalInfo.php');
mb_internal_encoding('UTF-8');
set_time_limit(5);