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

⚠️ I have written a newer, simpler guide. This gist will not be updated anymore. See https://gist.github.com/fuzmish/df9eabf711c3f452ca19cce0621fc84e.

Running multi-arch images with Docker on Lima

Docker on Lima is one of the alternative solutions to Docker Desktop for Mac. Many people have already described the steps to set up for that. In addition to such a standard setup, this guide describes how to set up a Docker environment which can run multi-arch images. For example, you will be able to run linux/amd64 images on your M1 Mac.

Step 1. Install Lima

@chwnam
chwnam / kt_starbucks_2019.py
Last active July 2, 2024 10:00
스타벅스 와이파이 자동 인증 파이썬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 July 17, 2024 11:27
마크다운(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)
*/