Skip to content

Instantly share code, notes, and snippets.

View seongilp's full-sized avatar
🥕

Seongil Park seongilp

🥕
View GitHub Profile
@mitchellh
mitchellh / merge_vs_rebase_vs_squash.md
Last active September 29, 2025 04:01
Merge vs. Rebase vs. Squash

I get asked pretty regularly what my opinion is on merge commits vs rebasing vs squashing. I've typed up this response so many times that I've decided to just put it in a gist so I can reference it whenever it comes up again.

I use merge, squash, rebase all situationally. I believe they all have their merits but their usage depends on the context. I think anyone who says any particular strategy is the right answer 100% of the time is wrong, but I think there is considerable acceptable leeway in when you use each. What follows is my personal and professional opinion:

import React
import UIKit
class SecureImageView: UIView {
@objc var url: String = "" {
didSet {
do {
let imageUrl = URL(string: url)
let data = try Data(contentsOf: imageUrl!)
let image = UIImage(data: data)
@SanariSan
SanariSan / readme.md
Last active October 3, 2025 18:23
Telegram HTTP bot API via CURL | Send text, photos, documents, etc.

Here are some examples on how to use Telegram bot api via CURL

Prerequisites

For getting messages in private chat with bot

  • Create a bot using @BotFather, get it's token
  • Start conversation with bot
  • Run following curl command
curl https://api.telegram.org/bot/getUpdates | grep -Po '"from":{"id":.+?,'
@nrubin29
nrubin29 / homebrew_m1.sh
Last active September 1, 2025 17:19
Install Native Homebrew on Apple Silicon M1
# We'll be installing Homebrew in the /opt directory.
cd /opt
# Create a directory for Homebrew. This requires root permissions.
sudo mkdir homebrew
# Make us the owner of the directory so that we no longer require root permissions.
sudo chown -R $(whoami) /opt/homebrew
# Download and unzip Homebrew. This command can be found at https://docs.brew.sh/Installation.
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
https://techbloc.net/archives/3716
# OpenShift 3.1 to OpenShift 3.9:
journalctl -u atomic-openshift-master-api
journalctl -u atomic-openshift-master-controllers
journalctl -u atomic-openshift-node
journalctl -u etcd # or 'etcd_container' for containerized install
# OpenShift 3.10 and later versions:
/usr/local/bin/master-logs api api
@madhav1ag
madhav1ag / AWS-pytesseract.md
Last active September 1, 2024 23:19
Steps for installing Tesseract(4.0) on AWS-Lambda

Tesseract-OCR AWS Setup (using pytesseract and python2.7)

Follow these steps on a fresh 64bit AWS AIM instance

Connect to AWS AIM instance, then follow these steps:

  1. Update system libraries
sudo yum -y update
sudo yum -y upgrade
@lucj
lucj / k3s-multipass.sh
Created December 17, 2019 21:16
Setup a k3s kubernetes cluster using Multipass VMs
for node in node1 node2 node3;do
multipass launch -n $node
done
# Init cluster on node1
multipass exec node1 -- bash -c "curl -sfL https://get.k3s.io | sh -"
# Get node1's IP
IP=$(multipass info node1 | grep IPv4 | awk '{print $2}')