Skip to content

Instantly share code, notes, and snippets.

View dev-gwang's full-sized avatar
๐Ÿ 
Working from home

dev-gwang dev-gwang

๐Ÿ 
Working from home
View GitHub Profile
@chwnam
chwnam / kt_starbucks_2019.py
Last active March 29, 2025 05:16
์Šคํƒ€๋ฒ…์Šค ์™€์ดํŒŒ์ด ์ž๋™ ์ธ์ฆ ํŒŒ์ด์ฌ3 ์Šคํฌ๋ฆฝํŠธ
#!/usr/bin/env python3
import time
from http.cookiejar import Cookie
from re import search, findall
from urllib.parse import urlencode
from urllib.request import (
HTTPCookieProcessor,
HTTPRedirectHandler,
Request,
@lamak-qaizar
lamak-qaizar / gitlog.sh
Last active January 6, 2022 03:02
List commits between commit hashes
git log <from commit>..<to commit> --oneline
# commits with a custom output format
# e.g. |hash|author|date|commit message
git log <from commit>..<to commit> --pretty=format:"|%h|%an|%cD|%s"
# commits within a subdirectory or module
git log <from commit>..<to commit> --oneline ./subdirectory
# git docs: https://git-scm.com/docs/git-log
@afrontend
afrontend / .synergy.conf
Last active February 6, 2021 05:30
Synergy ์ปดํŒŒ์ผ ํ•˜๊ธฐ ์œ„ํ•œ ์Šคํฌ๋ฆฝํŠธ (v1.8.8) ๊ทธ๋ฆฌ๊ณ  synergy ์„ค์ • ํŒŒ์ผ, https://agvim.wordpress.com/2018/02/24/synergy/
# sample synergy configuration file
#
# comments begin with the # character and continue to the end of
# line. comments may appear anywhere the syntax permits.
section: screens
# three hosts named: moe, larry, and curly
moe:
larry:
curly:
@tralston
tralston / reload-config-postgresql.md
Created August 21, 2017 08:18
[Reload PostgreSQL config] After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. #postgres

After updating pg_hba.conf or postgresql.conf, the server needs the config needs to be reloaded. The easiest way to do this is by restarting the postgres service:

service postgresql restart

When the service command is not available (no upstart on Synology NAS, for example), there are some more creative ways to reload the config. Note this first one needs to be done under the user that runs postgres (usually the user=postgres).

user#  sudo su postgres
postgres#  pg_ctl reload
@benjaminbarbe
benjaminbarbe / README.md
Last active September 18, 2023 17:29 — forked from raucao/nginx-lua-s3.nginxconf
Nginx proxy to S3 with caching
@ihoneymon
ihoneymon / how-to-write-by-markdown.md
Last active December 15, 2025 06:39
๋งˆํฌ๋‹ค์šด(Markdown) ์‚ฌ์šฉ๋ฒ•

[๊ณตํ†ต] ๋งˆํฌ๋‹ค์šด markdown ์ž‘์„ฑ๋ฒ•

์˜์–ด์ง€๋งŒ, ์กฐ๊ธˆ ๋” ์ƒ์„ธํ•˜๊ฒŒ ๋งˆํฌ๋‹ค์šด ์‚ฌ์šฉ๋ฒ•์„ ์•ˆ๋‚ดํ•˜๊ณ  ์žˆ๋Š”
"Markdown Guide (https://www.markdownguide.org/)" ๋ฅผ ๋ณด์‹œ๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•ฉ๋‹ˆ๋‹ค. ^^

์•„, ๊ทธ๋ฆฌ๊ณ  ๋งˆํฌ๋‹ค์šด๋งŒ์œผ๋กœ ํ‘œํ˜„์ด ๋ถ€์กฑํ•˜๋‹ค๊ณ  ๋А๋ผ์‹ ๋‹ค๋ฉด, HTML ํƒœ๊ทธ๋ฅผ ํ™œ์šฉํ•˜์‹œ๋Š” ๊ฒƒ๋„ ์ข‹์Šต๋‹ˆ๋‹ค.

1. ๋งˆํฌ๋‹ค์šด์— ๊ด€ํ•˜์—ฌ

@izimbra
izimbra / Replace first occurrence of a string with sed
Created October 26, 2013 11:37
Replaces first occurrence of a string in a file using sed. This was tried and worked in OS X 10.9. #osx #shell #sed
sed '1,/string/ s/string/replacement/' file
#!/usr/bin/env groovy
import groovy.sql.Sql
import com.mysql.jdbc.*
/**
* A small example script on how to connect to a mysql database in a groovy script.
*
* @author: Marcel Maatkamp (m.maatkamp avec gmail dot com)
*/