Skip to content

Instantly share code, notes, and snippets.

View stamina321's full-sized avatar

stamina321

  • France
View GitHub Profile
@stamina321
stamina321 / 00-backlight.rules
Last active December 22, 2015 00:58
If you are backlight problem on boot, for example with i915 driver (Intel GPU), you can try this... It is an udev rule for define default backlight.
## create a file .rules in /etc/udev/rules.d directory
## find KERNEL with 'ls -1 /sys/class/backlight'
## ATTR{brightness} between 0 and 100
#
SUBSYSTEM=="backlight", ACTION=="add", KERNEL=="acpi_video0", ATTR{brightness}="15"
@stamina321
stamina321 / msttcorefonts.sh
Created October 2, 2013 13:37
Create the msttcorefonts rpm for fedora 19 an higher...
wget http://corefonts.sourceforge.net/msttcorefonts-2.5-1.spec
su -c 'yum install rpm-build cabextract ttmkfdir'
rpmbuild -bb msttcorefonts-2.5-1.spec
su -c 'yum install ~/rpmbuild/RPMS/noarch/msttcorefonts-2.5-1.noarch.rpm'
@stamina321
stamina321 / power_management.sh
Last active December 25, 2015 09:18
It's a little script for generate modprobe.conf, sysctl.conf and udev rules for increase battery life on a laptop. Execute as root.
#! /bin/sh
MODPROBE_D="/etc/modprobe.d"
SYSCTL_D="/etc/sysctl.d"
UDEV_RULES="/etc/udev/rules.d"
FILE="pm_$HOSTNAME"
## modprobe config
#
@stamina321
stamina321 / vimrc
Last active December 25, 2015 18:39
My vimrc file
"" Copy content into $HOME/.vimrc
" Enable 256 colors mode
set t_Co=256
" Enable synthax highlighting
syntax on
" Enable autoindent
set ai
" Disable vi-compatible
@stamina321
stamina321 / config
Last active December 25, 2015 18:39
My newsbeuter configuration file
## Copy content into $HOME/.newsbeuter/config
# GUI
color listfocus white blue
color listnormal_unread green default
color listfocus_unread white green
color info default default reverse bold
# Others options
browser firefox
@stamina321
stamina321 / change_border.sh
Last active December 26, 2015 02:39
How to change border decoration in gnome 3.8
#!/bin/sh
## Download a theme (see http://gnome-look.org)
## - https://dl.dropboxusercontent.com/u/80497678/MediterraneanNight-2.03.tar.gz
## And unarchive it and go into
THEME="MediterraneanWhite"
DST="$HOME/.local/share/themes"
# copy theme
@stamina321
stamina321 / tweaks.sh
Last active December 26, 2015 02:59
Some others tweaks for Gnome, Firefox...
# Gnome 3.8, show logout button
gsettings set org.gnome.shell always-show-log-out true
# Gnome 3.8, natural scroll
gsettings set org.gnome.settings-daemon.peripherals.touchpad natural-scroll true
# Gnome 3.8, no cursor blink
gsettings set org.gnome.desktop.interface cursor-blink false
@stamina321
stamina321 / journald.sh
Created November 4, 2013 18:33
Force systemd-journald.service storage as volatile. Be root and...
sed -i "/#Storage=auto/a Storage=volatile" /etc/systemd/journald.conf
rm -rf /var/log/journal
systemctl restart systemd-journald.service
@stamina321
stamina321 / dwb_easylist_update.sh
Last active December 29, 2015 04:09
This script download easylist (+liste_fr) for dwb. In dwb configuration enable adbloker and specify a path ($DIR/$FIC). See http://easylist.adblockplus.org for choose your list.
#!/bin/sh
DIR="$HOME/.config/dwb"
FIC="liste_fr+easylist.txt"
rm $DIR/$FIC*
wget -P $DIR https://easylist-downloads.adblockplus.org/$FIC
notify-send --hint=int:transient:1 --expire-time=50 "Easylist+liste_fr for dwb is up to date."
@stamina321
stamina321 / fedup.sh
Last active December 30, 2015 08:29
It's a memo for update your current Fedora. All commands can be executed as root. Just replace $RELEASE by the new release number of Fedora (ex: 20 for Heisenbug - 12/2013).
# as root on current fedora
yum update
yum upgrade
yum install fedup
reboot
fedup --network $RELEASE
reboot
# choose fedup on grub and wait...