Skip to content

Instantly share code, notes, and snippets.

View blood72's full-sized avatar

Kim Dong-Hyeon blood72

  • @marketboro 마켓보로
  • South Korea
  • 16:28 (UTC +09:00)
View GitHub Profile
@blood72
blood72 / Example.php
Created October 7, 2020 04:35
Load Eloquent directly from DB stored in json format snapshot data.
<?php
namespace App\Models;
class Example extends Model
{
/**
* @see Post
* @param string $value
* @return Post|\Illuminate\Database\Eloquent\Model
@blood72
blood72 / HasFactory.php
Last active October 10, 2020 11:28
Guess factory class name & path based on class_basename() in Laravel 8
<?php
namespace App\Concerns;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Database\Eloquent\Factories\HasFactory as BaseTrait;
trait HasFactory
{
use BaseTrait;
@blood72
blood72 / DefaultGuardChangeDynamically.php
Created October 29, 2020 12:57
Change Auth default guard dynamically
<?php
namespace App\Http\Middleware;
use Closure;
class DefaultGuardChangeDynamically
{
/**
* Handle an incoming request.
@blood72
blood72 / version.php
Last active July 8, 2021 08:36
Get the closest version to a given value & Sort to version
<?php
if (! function_exists('version_sort')) {
/**
* Sort array with version_compare.
* @link https://stackoverflow.com/a/48974986/5067386
* @param string[] $versions
* @return void
*/
function version_sort(array $versions) {
@blood72
blood72 / array_column_recursive.php
Last active April 12, 2021 18:38
Return the values from a single column in the input array recursively
<?php
if (! function_exists('array_column_recursive')) {
/**
* Return the values from a single column in the input array recursively
*
* @param array $array
* @param int|string|null $columnKey
* @param int|string|null $indexKey
* @return array
@blood72
blood72 / naver-cc-disable.js
Created May 27, 2021 02:58
Naver Hyperlink-Auditing Blocker; bypass to move cc.naver.com
// ==UserScript==
// @name Naver Hyperlink-Auditing Blocker
// @version 1.0.0
// @description bypass to move cc.naver.com
// @match http://*.naver.com/*
// @match https://*.naver.com/*
// @grant none
// @run-at document-start
// ==/UserScript==
@blood72
blood72 / wa-event-parser.py
Created May 30, 2021 11:05
2018-10-15~2018-11-02 와룡전설 이벤트 글 추적기 (python 3.5)
from bs4 import BeautifulSoup
from tkinter import Tk, Label, IntVar, Entry, Button
import requests
import ctypes
import win32process
import os
import sys
# variables
base_url = "http://wa.ilovegame.co.kr/event/read/"
@blood72
blood72 / gmarket-mouse-right-click-enabler.js
Last active July 11, 2021 08:14
Accept mouse right button click on Gmarket
// ==UserScript==
// @name Gmarket Mouse Click Enabler
// @version 1.1.0
// @description accept mouse right button click
// @match http://item.gmarket.co.kr/*
// @match https://item.gmarket.co.kr/*
// @match http://*.auction.co.kr/*
// @match https://*.auction.co.kr/*
// @grant none
// @run-at document-end
@blood72
blood72 / khinsider-batch-downloader.js
Created September 6, 2021 19:08
khinsider batch downloader (mainly written by maple3142)
// ==UserScript==
// @name khinsider Batch Downloader
// @description batch download for downloads.khinsider.com
// @version 1.0.0
// @match https://downloads.khinsider.com/game-soundtracks/album/*
// @require https://cdn.jsdelivr.net/npm/web-streams-polyfill@3.1.1/dist/ponyfill.min.js
// @require https://cdn.jsdelivr.net/npm/streamsaver@2.0.5/StreamSaver.js
// @require https://cdn.jsdelivr.net/npm/streamsaver@2.0.5/examples/zip-stream.js
// @connect 23.237.126.42
// @connect vgmsite.com
@blood72
blood72 / BlueStacks.ahk
Last active September 25, 2021 05:57
Default audio switcher temporarily for BlueStacks 4 (AHK script)
#NoEnv
/*
* Variables
*/
AUDIO_DEVICE_1 = __SOUND_DEVICE_WHAT_YOU_WANT_TO_SET_TEMPORARILY__
AUDIO_DEVICE_2 = __SOUND_DEVICE_THE_ORIGINAL_ONE__
;BLUESTACKS4_COMMAND = -json "{\"app_icon_url\":\"\",\"app_name\":\"Microsoft Launcher\",\"app_url\":\"\",\"app_pkg\":\"com.microsoft.launcher\"}"
global BLUESTACKS4_LAUNCHER_PATH := "__YOUR_BLUESTACKS4_PATH__\Bluestacks.exe " . BLUESTACKS4_COMMAND