Skip to content

Instantly share code, notes, and snippets.

@dogukancagatay
dogukancagatay / first-steps-fedora-40.md
Last active May 15, 2024 19:59
First steps fedora 40

Fedora First Steps

Essential Apps

sudo dnf install -y neovim git htop

Desktop apps

@dogukancagatay
dogukancagatay / daemon.json
Last active April 9, 2024 07:08
Sample Docker daemon.json
{
"data-root": "/mnt/disk1/docker",
"storage-driver": "overlay2",
"insecure-registries" : [
"192.168.1.200:5000"
],
"dns": [
"192.168.1.1"
],
"registry-mirrors" : [
@dogukancagatay
dogukancagatay / KeyDB with Docker.md
Last active March 27, 2024 07:22
Basic KeyDB Configuration with Docker

KeyDB with Docker

Migration from Redis

Connect to your keydb server new-keydb-server-1

keydb-cli -h new-keydb-server-1
@dogukancagatay
dogukancagatay / Makefile
Created June 27, 2014 18:14
Simple latex Makefile using latexmk
# Latex Makefile using latexmk
# Modified by Dogukan Cagatay <dcagatay@gmail.com>
# Originally from : http://tex.stackexchange.com/a/40759
#
# Change only the variable below to the name of the main tex file.
PROJNAME=main
# You want latexmk to *always* run, because make does not have all the info.
# Also, include non-file targets in .PHONY so they are run regardless of any
# file of the given name existing.
@dogukancagatay
dogukancagatay / mypy_compiled.sh
Last active March 15, 2024 13:47
Install compiled version of Mypy #python #mypy
#!/usr/bin/env bash
# Check whether your mypy version compiled: `mypy --version`
# Mypy works a lot faster when using the compiled version
## Usage:
## curl -fL 'https://gist.githubusercontent.com/dogukancagatay/99df8636b0ca9d5a59f40b50f4a70970/raw/mypy_compiled.sh' | bash
MYPY_VERSION="${1:-1.9.0}"
curl -fL -o /tmp/${MYPY_VERSION}.tar.gz "https://github.com/python/mypy/archive/refs/tags/${MYPY_VERSION}.tar.gz"
@dogukancagatay
dogukancagatay / trigger-timedatectl-sync.py
Created March 14, 2024 08:27
Python script to force timedatectl NTP time sync
import socket
import struct
import subprocess
import time
REF_TIME_1970 = 2208988800 # Reference time
def get_ntp_time(addr="0.de.pool.ntp.org") -> int | None:
client = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
@dogukancagatay
dogukancagatay / macos_vm_parallels.md
Created February 8, 2024 14:44
Create MacOS VM on Parallels #macos #parallels #vm

Create MacOS VM on Parallels

Download ipsw image for the desired version of the MacOS. Use the following site to get the link.

wget 'https://updates.cdn-apple.com/2024WinterFCS/fullrestores/042-78241/B45074EB-2891-4C05-BCA4-7463F3AC0982/UniversalMac_14.3_23D56_Restore.ipsw'
@dogukancagatay
dogukancagatay / sdkman-cheatsheet.md
Last active February 6, 2024 09:36
sdkman cheatsheet #sdkman #java

sdkman Cheatsheet

List supported software

sdk list

List Java versions

# sdk list &lt;
@dogukancagatay
dogukancagatay / lima_fedora35.yaml
Last active March 30, 2023 15:12
Lima Fedora configuration files derived from default.yaml with fallback image urls
# ===================================================================== #
# BASIC CONFIGURATION (FEDORA 37)
# ===================================================================== #
# Default values in this YAML file are specified by `null` instead of Lima's "builtin default" values,
# so they can be overridden by the $LIMA_HOME/_config/default.yaml mechanism documented at the end of this file.
# VM type: "qemu" or "vz" (on macOS 13 and later).
# The vmType can be specified only on creating the instance.
# The vmType of existing instances cannot be changed.
@dogukancagatay
dogukancagatay / Makefile
Last active September 21, 2022 16:03
List OpenCL devices on the system using OpenCL C++ Wrapper.
UNAME_S := $(shell uname -s)
# -std=c++11 -Wall -march=native
ifeq ($(UNAME_S),Linux)
CXX=clang++
CPPFLAGS=-O3
LDFLAGS=-O3
LDLIBS=-lOpenCL
endif
ifeq ($(UNAME_S),Darwin)