Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / ubuntu add-ons
Last active March 18, 2021 05:27
Useful ubuntu add-ons
dash to panel
clipboard indicator
night light slider
@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
set number
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab autoindent
@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

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

@yasinuygun
yasinuygun / video_image_downsizing_commands.md
Created January 20, 2024 13:49
downsize images and videos

Downsize images

ls *.jpg | xargs -I{} convert {} -resize '800x800>' resized_{}

Downsize videos

ls *.mp4 | xargs -I{} ffmpeg -i {} -vf "scale=800:800:force_original_aspect_ratio=decrease,pad=800:800:(ow-iw)/2:(oh-ih)/2" resized_{}
@yasinuygun
yasinuygun / .ptpython.config.py
Created October 8, 2024 13:41
.ptpython.config.py
def configure(repl):
repl.show_docstring = True
repl.show_signature = True
repl.use_code_colorscheme('dracula')
repl.show_line_numbers = True
repl.highlight_matching_parenthesis = True
repl.enable_mouse_support = True
repl.complete_while_typing = True
repl.enable_fuzzy_completion = True
repl.prompt_style = 'ipython'
@yasinuygun
yasinuygun / .zshrc
Last active October 8, 2024 14:45
.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"'