Skip to content

Instantly share code, notes, and snippets.

View v0lkan's full-sized avatar
🎸
totally rocking it 🚀.

Volkan Özçelik v0lkan

🎸
totally rocking it 🚀.
View GitHub Profile
@v0lkan
v0lkan / private-go.md
Last active September 5, 2022 03:46
How to Import Private Go Repositories

Have this in your ~/.gitconfig:

[url "ssh://git@github.com/"]
  insteadOf = https://github.com/

Make sure you have these environment variables set:

@v0lkan
v0lkan / install-nginx.sh
Last active September 5, 2022 03:21
How to Install NGINX on Amazon EC2 Linux
sudo amazon-linux-extras list | grep nginx
# 38 nginx1=latest disabled [ =stable ]
sudo amazon-linux-extras enable nginx1
# 38 nginx1=latest enabled [ =stable ]
# Now you can install:
sudo yum clean metadata
sudo yum -y install nginx
@v0lkan
v0lkan / configure-iterm2.md
Last active September 3, 2022 17:41
How to Use `iterm2` like `guake`
  • First, install iterm2:
brew install iterm2 --cask
  • Then, go to Preferences → Keys → Hotkey and check the “show/hide all windows with a system-wide hotkey” checbox and choose your hotkey combination.
    • I use CTRL+~ to be Quake-compatible :), choose whatever suits your needs.
@v0lkan
v0lkan / daemon.json.md
Last active September 3, 2022 07:41
Override Docker DNS

The easiest way is to edit or create an /etc/docker/daemon.json similar to the following:

{
  "iptables": true,
  "dns": ["1.1.1.1", "8.8.8.8"]
}
@v0lkan
v0lkan / install-kubectl.sh
Created September 3, 2022 06:56
Install `kubectl` to Amazon EC2 Linux
# 1. Get the latest kubectl version:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
# 2. Get checksum
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
# 3. Validate
echo "$(<kubectl.sha256) kubectl" | sha256sum --check
# should output: “kubectl: OK”
@v0lkan
v0lkan / install-minikube.sh
Last active September 3, 2022 07:43
Install Minikube on EC2 Linux
# 1. First, make sure that you have Docker installed and running:
# ref: https://gist.github.com/v0lkan/537a8ed74b6e765b97323ff98c1a075a
# 2. Install minikube
# ref: https://minikube.sigs.k8s.io/docs/start/
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube
# 3. Start minikube
minikube start --driver=docker
@v0lkan
v0lkan / fix-docker-perms.sh
Last active September 3, 2022 05:09
How to fix the “Got permission denied while trying to connect to the Docker daemon…” warning
# ref: https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user
sudo groupadd docker
sudo usermod -aG docker ${USER}
su -s ${USER}
# If that does not work, try this:
# newgrp docker
@v0lkan
v0lkan / index.md
Last active October 24, 2022 01:40
List of my useful gists, because GitHub is terrible at arranging them.

About

This is a collection of recipes that I gather from various sources.

It is NOT a replacement for the official docs. I maintain them at a “best effort” basis.

I also provide links to official references in these recipes whenever applicable.

Enjoy, and may the source be with you 🦄.

@v0lkan
v0lkan / install-docker.sh
Last active September 3, 2022 00:45
Install Docker on EC2 Linux
# Install Docker:
sudo yum update
sudo yum search docker
sudo yum info docker
sudo yum install docker
# Start the docker daemon:
sudo systemctl start docker
# Check Docker’s status:
@v0lkan
v0lkan / AutoHotKey.ahk
Last active October 10, 2020 11:30
My AutoHotKey Setup to use typographical quotes and dashes on windows.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; map CMD to CTRL because I am on a Windows VM.
LWin::LCtrl
+![::
{