Skip to content

Instantly share code, notes, and snippets.

set number
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab autoindent
@yasinuygun
yasinuygun / ubuntu add-ons
Last active March 18, 2021 05:27
Useful ubuntu add-ons
dash to panel
clipboard indicator
night light slider
@yasinuygun
yasinuygun / .gitconfig
Last active January 1, 2022 08:37
My .gitconfig file.
[user]
name = <name>
email = <email>
[core]
editor = vim
[alias]
ss = status -s
lgd = log --oneline --graph --decorate
lagd = log --all --oneline --graph --decorate
ch = checkout
@yasinuygun
yasinuygun / terraform.sh
Last active March 18, 2021 05:22
terraform commands
tfenv list-remote # list all versions
tfenv list # list installed versions
tfenv install <version>
tfenv use <version>
rm-rf .terraform/modules # delete modules
terraform init
terraform plan -target=module.<module-name> # plan change for target module
terraform apply -target=module.<module-name> # apply the change for target module
@yasinuygun
yasinuygun / docker-compose-kafka.yml
Created March 18, 2021 04:53
docker-compose kafka
version: '3.9'
services:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
ports:
@yasinuygun
yasinuygun / kafka-cheetsheet.sh
Last active March 18, 2021 05:29
Example kafka commands
kafka-topics.sh --list --bootstrap-server localhost:9092
kafka-topics.sh --describe --topic example-topic --bootstrap-server localhost:9092
kafka-topics.sh --create --topic example-topic --bootstrap-server localhost:9092
kafka-topics.sh --delete --topic example-topic --bootstrap-server localhost:9092
kafka-console-consumer.sh --from-beginning --topic example-topic --bootstrap-server localhost:9092
kafka-console-producer.sh --topic example-topic --bootstrap-server localhost:9092
@yasinuygun
yasinuygun / .zshrc
Last active April 3, 2024 08:18
.zshrc
plugins=(git zsh-autosuggestions colored-man-pages zsh-syntax-highlighting)
alias ll='ls -alF'
alias lats='ls -lat | less'
alias dls='cd ~/Downloads'
alias dsk='cd ~/Desktop'
alias docs='cd ~/Documents'
alias cd..='cd ..'
alias op='open'
alias spark-shell='spark-shell --conf spark.driver.extraJavaOptions="-Dscala.color"'
@yasinuygun
yasinuygun / whisper_subtitle_generator.py
Last active January 6, 2024 08:43
Whisper Subtitle Generator
import sys
import whisper
from whisper.utils import write_srt
def run(input_path: str, output_path: str) -> None:
model = whisper.load_model("base")
result = model.transcribe(input_path)
@yasinuygun
yasinuygun / yapf-pre-commit-hook
Last active August 8, 2023 12:47
yapf pre-commit git hook
#!/bin/sh
# Run yapf on modified Python files
files=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.py$')
if [ -n "$files" ]; then
yapf --style "{based_on_style: pep8, column_limit: 120}" -i $files
git add $files
fi

LaTeX on MacOS

  1. Install texlive.
    curl -LO http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
    tar -xzf install-tl-unx.tar.gz
    rm install-tl-unx.tar.gz
    cd install-tl-*
    chmod +x install-tl

./install-tl