Skip to content

Instantly share code, notes, and snippets.

View seunggabi's full-sized avatar
๐ŸŽฏ
Focusing

Seunggabi Kim seunggabi

๐ŸŽฏ
Focusing
View GitHub Profile
@seunggabi
seunggabi / prepare-commit-msg
Last active November 1, 2023 08:03
prepare-commit-msg
#!/bin/bash
if [ -z "${SKIP_BRANCH}" ]; then
SKIP_BRANCH=(master develop release hotfix)
fi
NAME=$(git symbolic-ref --short HEAD)
NAME="${NAME##*/}"
@seunggabi
seunggabi / semantic-branch-names.md
Last active April 16, 2025 06:32
Semantic Branch Names

Semantic Branch Names

See how a minor change to your branch name style can make you a better programmer.

Format: <type>/#<issueNumber>-<alias>

Example

@ciiqr
ciiqr / dispatch.sh
Last active February 19, 2025 12:25
github actions, repository_dispatch with client_payload
# TODO: replace :token, :user, and :repo
curl -H "Authorization: token :token" \
-H 'Accept: application/vnd.github.everest-preview+json' \
"https://api.github.com/repos/:user/:repo/dispatches" \
-d '{"event_type": "awesomeness", "client_payload": {"foo": "bar"}}'
@jinsangYoo
jinsangYoo / npm-save-save-dev-different.md
Last active June 14, 2021 13:48
npm --save, --save-dev์˜ ์ฐจ์ด์ 
  • ๊ทธ๋ƒฅ install ํ•˜๋ฉด ./node_modules ๋””๋ ‰ํ„ฐ๋ฆฌ์— ํŒจํ‚ค์ง€ ์„ค์น˜๋ฅผ ํ•˜๊ณ  ๋.

  • --save, --save-dev ์˜ต์…˜์€ ./package.json ์—…๋ฐ์ดํŠธ๋ฅผ ๊ฐ™์ดํ•ด์ค€๋‹ค.

    • ์–ด๋””์— ํŒจํ‚ค์ง€ ์ •๋ณด๋ฅผ ์ถ”๊ฐ€ํ•˜๋А๋ƒ๊ฐ€ ๋‹ค๋ฅธ๋ฐ, --save ์˜ต์…˜์€ dependencies object์— ์ถ”๊ฐ€ํ•˜๊ณ  --save-dev ์˜ต์…˜์€ devDepenencies object์— ์ถ”๊ฐ€ํ•œ๋‹ค.
  • dependencies์™€ devDepenencies ์ฐจ์ด๋Š” npm install์„ ํ•  ๋•Œ ๋‚˜ํƒ€๋‚œ๋‹ค.

    • dependencies๋Š” ํ•ญ์ƒ ์„ค์น˜๋˜๊ณ 
    • devDepenencies๋Š” --production ์˜ต์…˜์„ ๋ถ™์ด๋ฉด ๋น ์ง„๋‹ค.
  • npm install โ€œ$packageโ€ ๋ช…๋ น์–ด๋กœ ์„ค์น˜ํ•  ๋•Œ๋Š” --dev ์˜ต์…˜์„ ๋ถ™์—ฌ์•ผ์ง€๋งŒ ์„ค์น˜๋œ๋‹ค.

์ถœ์ฒ˜

@MinCha
MinCha / ggtics-dev-jd.md
Last active December 28, 2022 09:10
GGtics ์‹ ์ž… ๋ฐ ๊ฒฝ๋ ฅ ๊ฐœ๋ฐœ์ž ์ฑ„์šฉ

ํšŒ์‚ฌ

๋ชจ์ง‘

  • ์‹ ์ž…/๊ฒฝ๋ ฅ ์„œ๋ฒ„ ๊ฐœ๋ฐœ์ž (Java, Scala, Spring)
  • ์‹ ์ž…/๊ฒฝ๋ ฅ FE ๊ฐœ๋ฐœ์ž (React)
@tmusabbir
tmusabbir / create-spark-cluster.sh
Created March 26, 2018 03:19
AWS CLI command to create EMR cluster with default auto-scaling task group
aws emr create-cluster --auto-scaling-role EMR_AutoScaling_DefaultRole --termination-protected --applications Name=Hadoop Name=Hive Name=Spark --ebs-root-volume-size 10 --ec2-attributes '{"InstanceProfile":"EMR_EC2_DefaultRole","SubnetId":"subnet-xxxx","EmrManagedSlaveSecurityGroup":"sg-xxxxx","EmrManagedMasterSecurityGroup":"sg-xxxxx"}' --service-role EMR_DefaultRole --enable-debugging --release-label emr-5.12.0 --log-uri 's3n://aws-logs-xxxx/elasticmapreduce/' --name 'spark-cluster' --instance-groups '[{"InstanceCount":2,"BidPrice":"0.30","AutoScalingPolicy":{"Constraints":{"MinCapacity":0,"MaxCapacity":20},"Rules":[{"Action":{"SimpleScalingPolicyConfiguration":{"ScalingAdjustment":2,"CoolDown":300,"AdjustmentType":"CHANGE_IN_CAPACITY"}},"Description":"","Trigger":{"CloudWatchAlarmDefinition":{"MetricName":"YARNMemoryAvailablePercentage","ComparisonOperator":"LESS_THAN","Statistic":"AVERAGE","Period":300,"Dimensions":[{"Value":"${emr.clusterId}","Key":"JobFlowId"}],"EvaluationPeriods":1,"Unit":"PERCENT","Na
@nuclearglow
nuclearglow / convert-arraybuffer.js
Created January 26, 2018 10:30
ArrayBuffer <-> JSON <-> ArrayBuffer
// array buffer to JSON
const dataString JSON.stringify(Array.from(new Uint8Array(arrayBuffer)));
// send around
// JSON to ArrayBuffer
new Uint8Array(JSON.parse(dataString)).buffer
@tiagocardosos
tiagocardosos / clear_binary_log_mysql.txt
Last active March 5, 2024 12:18
MySQL Clear Binary Log
Can I Remove MySQL Binary Log Yes, as long as the data is replicated to Slave server, itโ€™s safe to remove the file. Itโ€™s recommend only remove MySQL Binary Log older than 1 month.
Besides, if Recovery of data is the main concern, itโ€™s recommend to archive MySQL Binary Log.
There are several ways to remove or clean up MySQL Binary Log, itโ€™s not recommend to clean up the file manually, manually means running the remove command.
Remove MySQL Binary Log with RESET MASTER Statement Reset Master statement is uses for new database start up during replication for Master and Slave server. This statement can be used to remove all Binary Log.
To clean up Binary Log on Master Server
@khornberg
khornberg / encode_decode_dictionary.py
Created August 25, 2017 12:39
python 3 base64 encode dict
"""
Given a dictionary, transform it to a string. Then byte encode that string. Then base64 encode it and since this will go
on a url, use the urlsafe version. Then decode the byte string so that it can be else where.
"""
data = base64.urlsafe_b64encode(json.dumps({'a': 123}).encode()).decode()
# And the decode is just as simple...
data = json.loads(base64.urlsafe_b64decode(query_param.encode()).decode())
# Byte encode the string, base64 decode that, then byte decode, finally transform it to a dictionary
@ruanbekker
ruanbekker / python_mailer_smtplib.py
Created July 26, 2017 15:25
Python SMTP Mailer using Amazon SES (smtplib)
import sys
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
name = "Ruan"
from_address = "[email protected]"
to_address = "[email protected]"
subject = "Test"