Skip to content

Instantly share code, notes, and snippets.

@crosstyan
crosstyan / komorebic.ahk
Last active May 21, 2024 21:59
komorebic.ahk for AutoHotkey v2
#SingleInstance Force
WorkspaceNumber := 9
ArrayFromZero(Length){
temp := []
Loop Length {
temp.Push(A_Index-1)
}
return temp
@manboubird
manboubird / gnu-parallel-bash-function-execution.sh
Last active May 21, 2024 21:58
GNU parallel bash fuction execution
#!/bin/bash
#
# GNU Parallel and Bash functions: How to run the simple example from the manual - Stack Overflow
# http://stackoverflow.com/questions/23814360/gnu-parallel-and-bash-functions-how-to-run-the-simple-example-from-the-manual
#
SCRIPT_DIR="$(cd $(dirname ${BASH_SOURCE:-$0}); pwd)"
WORKSPACE=${WORKSPACE:-$(pwd)}
log() { echo "[$(date +"%F %T")] $@"; }
@haasn
haasn / image.lua
Last active May 21, 2024 21:54
mvi - set of configuration for turning mpv into an image viewer
-- Allow changing a property with by zoom-adjusted amount
function zoom_invariant_add(prop, amt)
amt = amt / 2 ^ mp.get_property_number("video-zoom")
mp.set_property_number(prop, mp.get_property_number(prop) + amt)
end
-- Resets the pan if the entire image would be visible
function zoom_check_center()
local zoom = mp.get_property_number("video-zoom")
local rot = mp.get_property_number("video-rotate") * math.pi / 180
@dkuku
dkuku / pritunl.sh
Created December 31, 2020 17:49
pritunl client with support for 2fa in one line
#run as root
export LOGIN=login PASS=password OTP=$(2fa vpn); openvpn --config /home/user/.config/pritunl/profiles/*.ovpn --auth-user-pass <(echo -e "$LOGIN\n$PASS$OTP")
@dhh
dhh / linux-setup.sh
Last active May 21, 2024 21:52
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl btop \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@GetVladimir
GetVladimir / Force-RGB-Color-on-M1-Mac.md
Last active May 21, 2024 21:51
Force RGB Color on M1 Mac

Force RGB Color on M1 Mac

How to Force RGB Color Output instead of YPbPr on your M1 Apple Silicon Mac for an External Monitor.

This step-by-step video tutorial will guide you through the procedure of forcing RGB color output on your M1 Mac.

Force RGB Color on M1 Mac

Here is the direct link to the video tutorial: https://www.youtube.com/watch?v=Z1EqH3fd0V4

The video also has Closed Captions (Subtitles) that you can enable, to make it easier to follow if needed.

terraform {
backend "local" {}
required_providers {
azurerm = {
source = "hashicorp/azurerm"
version = "3.77.0"
}
}
@Rend0e
Rend0e / Fix_MCLK_Clock_Stuck_Arch_Linux_Guide.md
Created July 26, 2023 02:00
Fix AMD GPU high idle power MCLK (vram / memory clock) stuck at 96 MHz / 1000 MHz for high refresh rates on Arch Linux Wayland & Xorg

Fix AMD GPU high idle power MCLK (vram / memory clock) stuck at 96 MHz / 1000 MHz for high refresh rates on Arch Linux Wayland & Xorg

On certain resolutions & refresh rates or multi-monitor setups, you might have noticed that your GPU MCLK (vram / memory clock) is stuck at the highest clock frequency (1000 MHz) [1] [2] causing higher GPU idle power draw. On Linux kernel 6.4.x, AMDGPU MCLK (vram/memory) clocks at the lowest, causing major FPS drops while gaming [1] [2]. This is likely due to a monitor not using Coordinated Video Timings (CVT) with a low V-Blank value for the affected resolutions & refresh rates. The higher clocking behavior is due to:

[Well, the reason the clocks get forced to max in some cases is to avoid the flickering you are seeing. There is a certain latency r

@rxaviers
rxaviers / gist:7360908
Last active May 21, 2024 16:56
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: πŸ˜„ :smile: πŸ˜† :laughing:
😊 :blush: πŸ˜ƒ :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
πŸ˜† :satisfied: 😁 :grin: πŸ˜‰ :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: πŸ˜€ :grinning:
πŸ˜— :kissing: πŸ˜™ :kissing_smiling_eyes: πŸ˜› :stuck_out_tongue:
@alessandro-fazzi
alessandro-fazzi / ancillary_objects.ipynb
Created May 21, 2024 14:08
[Ruby] Ancillary objects and inheritance: an alternative take
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.