Skip to content

Instantly share code, notes, and snippets.

View channprj's full-sized avatar

Park Hee Chan channprj

View GitHub Profile
@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
*/
🌞 Morning 331 commits ██▋░░░░░░░░░░░░░░░░░░ 12.7%
🌆 Daytime 581 commits ████▋░░░░░░░░░░░░░░░░ 22.4%
🌃 Evening 901 commits ███████▎░░░░░░░░░░░░░ 34.7%
🌙 Night 786 commits ██████▎░░░░░░░░░░░░░░ 30.2%
@channprj
channprj / disable-macbook-linux.sh
Created April 13, 2021 10:24
Turn off macbook (linux) screen
#!/bin/sh
echo 0 > /sys/class/backlight/nv_backlight/brightness
// csrftoken 쿠키 설정
const csrftoken = pm.cookies.get('csrftoken')
pm.environment.set('csrftoken', csrftoken);
// jwt 토큰 환경변수 설정
const responseData = pm.response.json();
pm.environment.set('access', responseData.access);
pm.environment.set('refresh', responseData.refresh);
@channprj
channprj / django-admin-toggle-filter-panel.jquery.js
Last active August 23, 2024 05:32
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 / 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 / remove-dangling-images-safely.sh
Last active February 18, 2021 01:32
Remove dangling container images safely
#!/bin/bash
# naive way
docker system prune -a -f
# ... or
# simple way
if [ $(echo -n $(docker images -f "dangling=true" -q) | wc -m) -gt 0 ]; then docker rmi -f $(docker images -f "dangling=true" -q); else echo "No Dangling container images"; fi
@channprj
channprj / npm-proxy.sh
Created September 24, 2020 03:19
NPM Proxy Setting
# Required
npm config set proxy http://<HOSTNAME>:<PORT>
npm config set https-proxy http://<HOSTNAME>:<PORT>
# Optional
npm config set strict-ssl false
@channprj
channprj / AWSSecurityContents.md
Created August 12, 2020 04:04 — forked from serithemage/AWSSecurityContents.md
AWS 보안 관련 자료 모음집

AWS 학습 링크집 시리즈

AWS 보안 관련 컨텐츠 모음집(http://bit.ly/secontents)

AWS 공식문서 중 보안에 관련된 자료들을 한글 자료 중심으로 정리한 페이지 입니다.

@channprj
channprj / README.md
Last active August 5, 2020 01:54
실행중인 파이썬 프로세스 모니터링하기

실행중인 파이썬 프로세스 모니터링하기

사전준비

pip install pyrasite urwid meliae

사용방법