Skip to content

Instantly share code, notes, and snippets.

View channprj's full-sized avatar

Heechan Park channprj

View GitHub Profile
@channprj
channprj / restream.css
Last active April 9, 2024 20:30
Personal restream css
body {
background-color: rgba(0, 0, 0, 0) !important;
margin: 0px auto; overflow: hidden;
}
.restream-embed-themes-chat-container.restream-embed-themes-chat-container_default {
background: transparent !important;
}
.message-item {
@channprj
channprj / django-admin-toggle-filter-panel.jquery.js
Last active February 29, 2024 20:56
Toggle Django Admin Filter Panel
(function($) {
$(document).ready(function($) {
$("tr input.action-select").actions();
$('<div id="show-filters" style="float: right;"><a href="#">&larr; 필터 보기</a></p>').prependTo('div.actions');
$('#show-filters').hide();
$('#changelist-filter h2').html('<a style="color: white;" id="hide-filters" href="#">필터 &rarr;</a>');
$('#show-filters').click(function() {
$('#changelist-filter').show('fast');
$('#changelist').addClass('filtered');
@channprj
channprj / README.md
Created January 9, 2024 07:38 — forked from lopspower/README.md
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@channprj
channprj / oldman_shaves_opensource.md
Last active September 19, 2023 10:43
퇴근길에 @lqez 님 트윗을 보고 갑자기 영감을 받아 작성해봤습니다. 이미 유행 한참 지난 밯망희 깎던 노인쓰,,,

바닐라 스크립트로 오픈소스 깎던 노인

벌써 3~4여 년 전이다. 내가 개발자로 취직한 지 얼마 안 되어 테헤란로 쪽에서 일할 때다. 퇴근하며 트위터 타임라인을 훑어보는 와중에, 재미있는 트윗을 발견하여 정독하던 중이었다. 스타벅스 앞을 지날 즈음, 그 곳에는 바닐라 자바스크립트로 오픈소스를 깎던 노인이 있었다. 마침 유용할 것 같은 프로젝트라 오픈소스 패키지로 받아 쓰려고 부탁을 했다. 버전을

"좀 빨리 올려 줄 수 없습니까?"

했더니,

"마이너 버전 릴리즈 하나 가지고 에누리하겠소? 비싸거든 다른 오픈소스 받아서 쓰시우."

@channprj
channprj / cheatsheet-elasticsearch.md
Last active August 25, 2023 07:45 — forked from ruanbekker/cheatsheet-elasticsearch.md
Elasticsearch Cheatsheet : Example API usage of using Elasticsearch with curl
@channprj
channprj / pyppeteer.py
Created November 5, 2020 17:54
Read html file and make pdf with pyppeteer
import asyncio
from pyppeteer import launch
async def main():
browser = await launch(
options={
'headless': True,
'args': [
'--no-sandbox',
@channprj
channprj / simulate.js
Created October 11, 2022 11:27 — forked from cs09g/simulate.js
Mouse/Touch Event Simulation
/**
* @desc It triggers mouse event.
* @param {HTMLElement} element target DOM element
* @param {string} type type of event
* @param {number} x clientX of event
* @param {number} y clientY of event
*/
export function simulateEvent(element, type, x, y) {
const mouseEvent = new MouseEvent(type, {
screenX: 0,
@channprj
channprj / alert-ssh-login.sh
Last active May 12, 2022 07:34
Simple SSH Login Notifier via PAM
# Create trigger file
touch /etc/ssh/sshd_notifier.sh
chmod +x /etc/ssh/sshd_notifier.sh
vim /etc/ssh/sshd_notifier.sh
#!/bin/bash
# /etc/ssh/sshd_notifier.sh
BOT_TOKEN="xxxxxx:12345678901234567890"
CHAT_ID="1234567890"
@channprj
channprj / safari-hacks.css
Created February 11, 2022 10:15
Hacks for Safari
@media not all and (min-resolution:.001dpcm) {
@supports (-webkit-appearance:none) {
div.something.annoying {
line-height: 18px;
}
}
}
@channprj
channprj / notion-worker.js
Last active November 28, 2021 18:33
Publish Notion homepage using https://fruitionsite.com
/* CONFIGURATION STARTS HERE */
/* Step 1: enter your domain name like fruitionsite.com */
const MY_DOMAIN = 'chann.dev';
/*
* Step 2: enter your URL slug to page ID mapping
* The key on the left is the slug (without the slash)
* The value on the right is the Notion page ID
*/