Skip to content

Instantly share code, notes, and snippets.

View eylles's full-sized avatar
🏠
playing unemployment simulator IRL

eylles

🏠
playing unemployment simulator IRL
  • Guatemala
  • 00:41 (UTC -06:00)
  • LinkedIn in/eylles
View GitHub Profile
@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.
@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:

@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 [email protected]
# 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.
@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