Skip to content

Instantly share code, notes, and snippets.

View lesstif's full-sized avatar

KwangSeob Jeong lesstif

View GitHub Profile
@lesstif
lesstif / app.php
Last active December 22, 2018 11:19
Isolate Laravel daily log and artisan log. update bootstrap/app.php
<?php
// blahblah
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
App\Exceptions\Handler::class
);
//------------------ START HERE
@lesstif
lesstif / svn2git-mig.sh
Created June 22, 2017 06:09
svn2git migration script
#!/bin/sh
## svn project
PRJS="test test2 test"
## svn repository root
SVN_ROOT=https://you-svn.examepl.com/svn/
## git ignore list
IGNORE="vim,java,maven,linux,eclipse,windows,intellij"
@lesstif
lesstif / mysql-conf.sh
Last active December 3, 2021 11:37
MySQL Server configuration file for docker.
#!/bin/bash
export MYSQL_CNF=$(cat <<CNF
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.6/en/server-configuration-defaults.html
[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
@lesstif
lesstif / auto_start_docker_container.sh
Last active March 20, 2022 00:22
docker container auto start template generator for systemd.
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root." 1>&2
exit 1
fi
##@see https://docs.docker.com/engine/admin/host_integration/
SYSTEMD_DIR=/etc/systemd/system/
@lesstif
lesstif / change-ubuntu-mirror.sh
Last active August 21, 2024 13:20
우분투(ubuntu)의 apt 기본 미러(mirror)를 다음 카카오(kakao), 카이스트(kaist), 부경대(harukasan) 으로 변경
#!/usr/bin/env bash
SL=/etc/apt/sources.list
PARAM="r:hm:dnak"
KAKAO=mirror.kakao.com
KAIST=ftp.kaist.ac.kr
HARU=ftp.harukasan.org
@lesstif
lesstif / compile-build-php7.sh
Last active October 15, 2020 01:55
compile build script for standalone php 7 on RHEL CentOS Ubuntu
#!/bin/sh
PHP_VER=7.3.21
#PHP_VER=7.1.20
FMT=.tar.xz
MAJOR=`echo ${PHP_VER}|awk -F. '{print $1}'`
MINOR=`echo ${PHP_VER}|awk -F. '{print $2}'`
### download latest
@w0rd-driven
w0rd-driven / passwords.txt
Created November 18, 2016 20:19
BFG Repo-Cleaner --replace-text example
PASSWORD1 # Replace literal string 'PASSWORD1' with '***REMOVED***' (default)
PASSWORD2==>examplePass # replace with 'examplePass' instead
PASSWORD3==> # replace with the empty string
regex:password=\w+==>password= # Replace, using a regex
regex:\r(\n)==>$1 # Replace Windows newlines with Unix newlines
@Pusnow
Pusnow / 한글과유니코드.md
Last active July 15, 2025 01:14
한글과 유니코드

한글과 유니코드

유니코드에서 한글을 어떻게 다루는지를 정리하였다.

유니코드

  • 유니코드(Unicode)는 전 세계의 모든 문자를 컴퓨터에서 일관되게 표현하고 다룰 수 있도록 설계된 산업 표준 (위키 백과)
  • 단순히 문자마다 번호를 붙임
  • 계속 업데이트되며 현재는 Unicode Version 9.0.0 이 최신이다.

UTF

  • 유니코드를 실제 파일 등에 어떻게 기록할 것인지를 표준화한 것이다.
--exclude='$RECYCLE.BIN' --exclude='$Recycle.Bin' --exclude='.AppleDB' --exclude='.AppleDesktop' --exclude='.AppleDouble' --exclude='.com.apple.timemachine.supported' --exclude='.dbfseventsd' --exclude='.DocumentRevisions-V100*' --exclude='.DS_Store' --exclude='.fseventsd' --exclude='.PKInstallSandboxManager' --exclude='.Spotlight*' --exclude='.SymAV*' --exclude='.symSchedScanLockxz' --exclude='.TemporaryItems' --exclude='.Trash*' --exclude='.vol' --exclude='.VolumeIcon.icns' --exclude='Desktop DB' --exclude='Desktop DF' --exclude='hiberfil.sys' --exclude='lost+found' --exclude='Network Trash Folder' --exclude='pagefile.sys' --exclude='Recycled' --exclude='RECYCLER' --exclude='System Volume Information' --exclude='Temporary Items' --exclude='Thumbs.db'
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active August 3, 2025 17:45
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32: