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
  • 04:20 (UTC -06:00)
View GitHub Profile
@endolith
endolith / Readme.txt
Last active July 23, 2024 18:43
Gnome to Wine color scraper
This is a Python script to extract GNOME/GTK's color scheme and apply it to Wine, so that the themes (approximately) match.
Instructions:
1. Set your Gnome theme as you would like it
2. Run with a command like "python wine_colors_from_gtk.py"
3. Restart any apps running in Wine. They should match the Gnome theme colors now.
Better description with screenshots here: http://www.endolith.com/wordpress/2008/08/03/wine-colors/
This is also stored on https://code.launchpad.net/~endolith/+junk/wine-color-scraper
@voyeg3r
voyeg3r / apt-fast.sh
Created May 20, 2010 12:54
apt-fast script
#!/bin/sh
# !/bin/sh
# apt-fast v0.02 by Matt Parnell http://www.mattparnell.com, this thing is fully open-source
# if you do anything cool with it, let me know so I can publish or host it for you
# contact me at admin@mattparnell.com
# Special thanks to Travis/travisn000 from the PCLinux Forums for making improvements that allow
# for more complex apt-get commands. See the thread: http://www.pclinuxos.com/forum/index.php/topic,66385.0.html
# Use this just like apt-get for faster package downloading. Make sure to have axel installed.
@drmalex07
drmalex07 / Readme-create-lsb-initd-script.md
Last active October 17, 2022 03:19
Another example of an (sysvinit) initd script using the LSB helpers. #sysvinit #initd #initd-scripts #lsb-init #linux #daemon

README

This is a very simple example of an init.d-style daemon that uses the LSB helpers. It is a modified version of the script found at http://www.thegeekstuff.com/2012/03/lsbinit-script.

Assume we have a daemon helloworld.py which can be invoked as (running at the foreground):

/path/to/helloworld.py /another-path/to/helloworld.ini

We want to wrap this daemon, say helloworld, into a init.d-style script (e.g. to include it in the normal boot sequence). When done, the daemon will be managed in the usual manner:

@biiont
biiont / iterate_shell_array.sh
Last active February 7, 2023 18:00 — forked from anonymous/iterate_shell_array.sh
Iterate over an array using POSIX Shell
#!/bin/sh
# Iterate over an array using POSIX Shell
# Initial data
ARR="a:b:c:d"
# Iteration. Do whatever is needed instead of 'echo "$VAL"'.
CDR="${ARR}:"; while [ -n "$CDR" ]; do CAR=${CDR%%:*}; echo "$CAR"; CDR=${CDR#*:}; done; unset CAR CDR
# IMPORTANT!!! Add semicolon to the end of an array (IT="${ARR}:") to make stop condition working.
@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

@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:
@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 \
@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
@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

@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.