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 / AWSCertifiedDeveloperUnofficialStudyGuide.md
Created September 1, 2022 03:42 — forked from serithemage/AWSCertifiedDeveloperUnofficialStudyGuide.md
AWS 공인 개발자 - 어소시에이트 수험 가이드
@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/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@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 / laravel-use-accessor-with-same-fieldname.php
Created June 24, 2021 02:25
[Laravel] Use accessor with same field name.
<?php
namespace App\\Models;
use Eloquent;
class Post extends Eloquent
{
protected $appends = [
'thumbnail',
@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 / 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 / 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 / pre-commit
Created June 4, 2020 06:05
git pre-commit for phpunit
#!/usr/bin/env php
<?php
// locate this {project root}/.git/hooks/pre-commit)
// and make this runnable with chmod +x
echo "Running tests.. ";
exec('vendor/bin/phpunit', $output, $returnCode);
if ($returnCode !== 0) {
// Show full output
echo PHP_EOL . implode($output, PHP_EOL) . PHP_EOL;
echo "Aborting commit.." . PHP_EOL;
@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 / 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