Skip to content

Instantly share code, notes, and snippets.

View epicsagas's full-sized avatar
🎯
Focusing

Sangseng Lee epicsagas

🎯
Focusing
View GitHub Profile
@epicsagas
epicsagas / 01-README.md
Created November 30, 2018 08:54 — forked from petemcw/01-README.md
Mac OS X LEMP Configuration

Mac OS X LEMP Configuration

This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.

Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.

Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup

Setup

It seems that it does not matter what timezone is on the server as long as you have the time set right for the current timezone, know the timezone of the datetime columns that you store, and are aware of the issues with daylight savings time.

On the other hand if you have control of the timezones of the servers you work with then you can have everything set to UTC internally and never worry about timezones and DST.

Here are some notes I collected of how to work with timezones as a form of cheatsheet for myself and others which might influence what timezone the person will choose for his/her server and how he/she will store date and time.

MySQL Timezone Cheatsheet

@epicsagas
epicsagas / iterm2-solarized.md
Created February 20, 2020 16:28 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@epicsagas
epicsagas / macbook-pro-2011-defective-gpu-fix.md
Created May 19, 2020 05:23 — forked from cdleon/macbook-pro-2011-defective-gpu-fix.md
Macbook Pro 2011 GPU Defect fix macOS Sierra and High Sierra
@epicsagas
epicsagas / mysql-large-db-import
Created September 23, 2020 04:32 — forked from molotovbliss/mysql-large-db-import
Importing Large DB faster MySQL Settings
Source: https://dba.stackexchange.com/questions/83125/mysql-any-way-to-import-a-huge-32-gb-sql-dump-faster
innodb_buffer_pool_size = 4G
innodb_log_buffer_size = 256M
innodb_log_file_size = 1G
innodb_write_io_threads = 16
innodb_flush_log_at_trx_commit = 0
Why these settings ?
innodb_buffer_pool_size will cache frequently read data
@epicsagas
epicsagas / rm_mysql.md
Created September 23, 2020 04:34 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@epicsagas
epicsagas / login-without-password-and-without-copy-key-to-server.md
Created November 4, 2020 16:43 — forked from marcoblos/login-without-password-and-without-copy-key-to-server.md
Step by step: create a pem file to login without password and without copy local keys to remote server. SSH authentication like AWS EC2.
  1. Login with account user (not root)
mkdir pem
cd pem
ssh-keygen -b 2048 -f identity -t rsa
  1. Copy public key contents to authorized_keys
@epicsagas
epicsagas / python2pseudo.py
Created February 8, 2022 12:04 — forked from BlueNexus/python2pseudo.py
Python to Pseudocode converter
import re
'''
Make sure to put
#F
as a comment at the end of lines that contain a function call that don't also contain an assignment (=).
'''
python_file = 'file.py'
work_file = None
@epicsagas
epicsagas / obsidian-web-clipper.js
Created August 31, 2022 01:06 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/[email protected]?module'), import('https://unpkg.com/@tehshrike/[email protected]'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@epicsagas
epicsagas / AWSCertifiedDeveloperUnofficialStudyGuide.md
Created September 1, 2022 03:42 — forked from serithemage/AWSCertifiedDeveloperUnofficialStudyGuide.md
AWS 공인 개발자 - 어소시에이트 수험 가이드