Skip to content

Instantly share code, notes, and snippets.

View lynkos's full-sized avatar
🍳
Cooked

lynkos

🍳
Cooked
View GitHub Profile
@NextdoorPsycho
NextdoorPsycho / chess_script.sh
Last active April 13, 2025 05:40
This script enables Apple’s Game Mode by launching the Chess app in fullscreen mode, which triggers Game Mode. It then deprioritizes the Chess process to minimize its resource usage, keeping the performance boost of Game Mode active without significant CPU/GPU drain from Chess. After making Chess fullscreen, the script switches focus back to the…
#!/bin/bash
LOG_FILE="chess_script.log"
log() {
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
}
# Requesting sudo privileges at the start
log "Requesting sudo privileges..."
@halilim
halilim / Homebrew OpenSSH with macOS keychain.md
Created December 29, 2023 20:50
Homebrew OpenSSH with macOS keychain

Problem:

  1. macOS (14.2.1) ssh (OpenSSH_9.4p1, LibreSSL 3.3.6) is vulnerable to Terrapin attack (as reported by the scanner).
  2. The regular OpenSSH (e.g. via Homebrew) doesn't support the UseKeychain option

Workaround:

  1. Automator > new Application > Run Shell Script: ~/bin/login-script, save as Login script.app
  2. Create a new file ~/bin/login-script with contents:

How to install game-porting-toolkit (aka proton for macOS)

You also might wanna just use Whisky which does this automatically

This guide works on macOS 13.4+ using Command Line Tools for XCode 15 Beta!

What is this?

In the recent WWDC, Apple announced and released the "game porting toolkit", which upon further inspection this is just a modified version of CrossOver's fork of wine which is a "compatibility layer" that allows you to run Windows applications on macOS and Linux.

@santaklouse
santaklouse / CrossOver.sh
Last active May 14, 2025 22:38
unlimited CrossOver trial (MacOS)
#!/usr/bin/env bash
# checck if pidof exists
PIDOF="$(which pidof)"
# and if not - install it
(test "${PIDOF}" && test -f "${PIDOF}") || brew install pidof
# find app in default paths
CO_PWD=~/Applications/CrossOver.app/Contents/MacOS
test -d "${CO_PWD}" || CO_PWD=/Applications/CrossOver.app/Contents/MacOS
@h3ssan
h3ssan / JetBrains trial reset.md
Last active May 13, 2025 07:27
Reset all JetBrains products trial in Linux

In some cases, only these lines will work

for product in IntelliJIdea WebStorm DataGrip PhpStorm CLion PyCharm GoLand RubyMine; do
    rm -rf ~/.config/$product*/eval 2> /dev/null
    rm -rf ~/.config/JetBrains/$product*/eval 2> /dev/null
done

But if not, try these

@TheSherlockHomie
TheSherlockHomie / RenewExpiredGPGkey.md
Created January 3, 2021 16:36
Updating expired GPG keys and backing them up 🔑🔐💻

Updating expired GPG keys and their backup 🔑🔐💻

I use a GPG key to sign my git commits.

An error like this one might be a sign of an expired GPG key.

error: gpg failed to sign the data fatal: failed to write commit object
@darrenpmeyer
darrenpmeyer / README.md
Created November 20, 2020 19:35
Automatically start a single instance of ssh-agent for all terminal sessions to share (bash)

Installation

  1. mkdir -p ~/.config && touch ~/.config/ssh-agent.pid
  2. Paste the contents of ssh-agent-manage.sh into your .bashrc or .bash_profile or similar
  3. killall -9 ssh-agent
  4. Start a new terminal session (note: old sessions will not see ssh-agent, only new ones)

Details

This snippet, when included in .bashrc, will ensure that your session has a working ssh-agent with all your ssh keys loaded into it. It does this without creating separate ssh-agent processes by:

@TinDang97
TinDang97 / build_ffmpeg_cuda_debian
Last active February 16, 2025 07:07
Build FFMPEG script with full feature, include scale_cuda, scale_npp, vpx, libx,...
#!/bin/bash
# https://github.com/markus-perl/ffmpeg-build-script
PROGNAME=$(basename $0)
VERSION=1.18
CWD=$(pwd)
PACKAGES="$CWD/packages"
WORKSPACE="$CWD/workspace"
CFLAGS="-I$WORKSPACE/include"