Skip to content

Instantly share code, notes, and snippets.

View eylles's full-sized avatar
💭
why do i even

eylles

💭
why do i even
  • Guatemala
  • 02:48 (UTC -06:00)
View GitHub Profile
@therightstuff
therightstuff / parallel_test.sh
Last active July 28, 2023 00:29
Sample bash script for managing multiple parallel processes
#!/usr/bin/env bash
# inspired by https://stackoverflow.com/a/29535256/2860309
pids=""
failures=0
function my_process() {
seconds_to_sleep=$1
exit_code=$2
@tkapias
tkapias / fzf-img.sh
Last active September 5, 2023 21:29
fzf-img.sh - Image fuzzy finder with preview using fzf and ueberzug
#!/usr/bin/env bash
# This is just an example how ueberzug can be used with fzf.
# Copyright (C) 2019 Nico Bäurer
# Copyright (C) 2022 Tomasz Kapias
# - Updated:
# - optional PATH as only option
# - internal FDfind query for images
# - display SVGs after caching a converted png
# - Imagemagick's identify infos as header with margin
@jonfk
jonfk / hollow_knight_fix_dualsense.txt
Last active July 28, 2024 04:41
Fix to use dualsense controller in hollow knight on linux
# This fixes the issue of swapped buttons and Triggers in the dualsense controller opening the pause menu
# The issue is caused by the SDL version used by hollow knight not recognizing the dualsense controller and
# mapping buttons properly. It is also not helped by steam input not disabling the native controller support
# when used in hollow knight. The issue cannot be fixed by simple mapping in steam input.
# Disable Steam Input
# Set the following as launch option
SDL_GAMECONTROLLERCONFIG="050000004c050000e60c000000810000,Sony DualSense ,a:b0,b:b1,back:b8,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b10,leftshoulder:b4,leftstick:b11,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:b12,righttrigger:a5,rightx:a3,righty:a4,start:b9,x:b3,y:b2,platform:Linux," %command%
@mariodivece
mariodivece / mad-scanlines-crt.glsl
Last active September 26, 2024 13:54
CRT Scanline Effect for Dolphin Emulator
void main()
{
float currentMillis = GetTime() / float(1000.0);
float2 coords = GetCoordinates();
float lineCount = GetWindowResolution().y / 2.0;
// scanlines
int lineIndex = int( ( coords.y + currentMillis * 0.5 ) * lineCount );
#ifdef API_OPENGL
float lineIntensity = mod(float(lineIndex), 2);
@khalid151
khalid151 / window_swallow.lua
Created June 18, 2020 23:27
Give AwesomeWM DWM-like window swallowing
-- These are changes required to enable DWM-like window swallowing.
-- The code is some spaghetti mess but.. it works (TM)
-- First, a callback must be added to all clients to find PPID of the window, which
-- refers to terminal window PID.
-- The behaviour I've noticed when launching applications from within zsh shell,
-- the PPID of the launched window is actually the PID of the zsh instance.
-- So I had to get PPID of it, to get the PID of terminal.
@Zeinok
Zeinok / wine-breeze-dark-theme.md
Last active October 15, 2024 00:57
Breeze Dark theme for Wine

Made possible with this reddit post.

Install

wine regedit wine-breeze-dark.reg

Uninstall (Reset Wine color scheme)

wine regedit wine-reset-theme.reg

@micycle1
micycle1 / a.md
Last active October 9, 2024 22:26
Downloading full-size media from DeviantArt

For direct image URL, the image quality is much lower than the original upload (the resolution and size of the original upload can be found in the right sidebar). This is not the case few years ago when the original image was accessible through right click, but on 2017, Wix acquired DeviantArt, and has been migrating the images to their own image hosting system from the original DeviantArt system. They linked most of the direct images to a stripped-down version of the original images; hence the bad image quality. Below are the three different formats of direct image URLs I found:

  • URL with /v1/fill inside: this means that the image went through Wix's encoding system and is modified to a specific size and quality. In this case, you remove ?token= and its values, add /intermediary in front of /f/ in the URL, and change the image settings right after /v1/fill/ to w_5100,h_5100,bl,q_100. The definitions of the values can be found in [Wix's Image Service](https://support.wi
@fxthomas
fxthomas / gnome-inhibit
Last active July 5, 2024 02:57
Inhibit gnome screensaver for a given program
#!/bin/bash
# Note: Doesn't work anymore (at least for Gnome 3.34, possibly later; see Python script instead)
# Usage: gnome-inhibit <command-line>
# Example: gnome-inhibit mpv video.mp4
cookie=$(dbus-send \
--session \
--dest=org.freedesktop.ScreenSaver \
--type=method_call \
--print-reply=literal \
@pubkey
pubkey / corsair_headset_linux.bash
Last active July 17, 2024 22:10
Corsair Gaming VOID Headset on Linux
# Corsair headsets will stuck the apps on your linux system. This is due to wrong usb-mapping.
# thx to http://www.c0urier.net/2016/corsair-gaming-void-usb-rgb-linux-fun
# 1. open terminal
# 2. type this and search the line with your headset
lsusb
# Get the USB ID of the headset and add it to xorg.conf:
@rvl
rvl / git-pushing-multiple.rst
Created February 9, 2016 11:41
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just