Skip to content

Instantly share code, notes, and snippets.

View ivoarch's full-sized avatar

ivoarch (Ivaylo Kuzev) ivoarch

View GitHub Profile
@ivoarch
ivoarch / bash-cheatsheet.sh
Last active September 5, 2015 21:57 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@ivoarch
ivoarch / compile-kmod.sh
Created September 12, 2015 09:01
compile a kmod against self compiled or other kernels
# How to compile a kmod against self compiled or other kernels
# Source: http://rpmfusion.org/Packaging/KernelModules/Kmods2
# Step 1
# If you don't have a rpm build environment set one up like this
su -c "yum -y install rpmdevtools kmodtool kernel-devel"
rpmdev-setuptree
# Step 2
@ivoarch
ivoarch / xstat
Created November 24, 2015 23:32 — forked from moiseevigor/xstat
xstat bash function to get file creation time on Linux with EXT4
xstat() {
for target in "${@}"; do
inode=$(ls -di "${target}" | cut -d ' ' -f 1)
fs=$(df "${target}" | tail -1 | awk '{print $1}')
crtime=$(sudo debugfs -R 'stat <'"${inode}"'>' "${fs}" 2>/dev/null |
grep -oP 'crtime.*--\s*\K.*')
printf "%s\t%s\n" "${crtime}" "${target}"
done
}
@ivoarch
ivoarch / touchpad-toggle.sh
Created February 28, 2016 23:25 — forked from llaumgui/touchpad-toggle.sh
Toggle touchpad activation with gsettings.
#!/bin/bash
#
# touchpad-toggle: Toggle touchpad activation with gsettings.
# Copyright (C) 2015 Guillaume Kulakowski <[email protected]>
# Version 1.0
#
SCHEMA="org.gnome.desktop.peripherals.touchpad"
KEY="send-events"
#!/bin/bash
EDIT=0
while (($#)) ; do
[[ ${1:0:1} != - ]] && break
case ${1:1} in
e) EDIT=1 ; shift ;;
*) echo "Unknown option $1, ignoring" ; shift ;;
esac
--- terminix-orig.spec 2016-05-22 23:55:26.342662000 +0200
+++ terminix.spec 2016-05-23 00:16:11.280897290 +0200
@@ -32,6 +32,8 @@
#fix wrong category
sed -i -e 's/Categories=Utilities/Categories=GNOME;GTK;System;TerminalEmulator;/' %{buildroot}%{_datadir}/applications/com.gexperts.Terminix.desktop
+#fix #337
+sed -i -e 's/DBusActivatable=true/DBusActivatable=false/' %{buildroot}%{_datadir}/applications/com.gexperts.Terminix.desktop
desktop-file-validate %{buildroot}%{_datadir}/applications/com.gexperts.Terminix.desktop
@ivoarch
ivoarch / xcursor theme tutorial
Created August 8, 2016 21:52 — forked from sole/xcursor theme tutorial
A lightly edited version of the xcursor theme tutorial by the_One at http://kde-look.org/content/show.php?content=11428
<---TUTORIAL FOR CREATING XCURSOR THEMES.--->
<---By ThEOnE @ kde-look--->
<[email protected]>
_______________________________________________________________________________________
| |
| First of all, let me tell you that everything I know I've learned it by inspecting |
| some xcursor themes like jaguarx, and others. |
#!/bin/sh
# ratpoison info
LIFE="$(($(($(date +%s) - $(date -d " $(head -1 /var/log/pacman.log | cut -d ' ' -f 1,2 | tr -d '[]')" +%s))) / 86400)) days"
PACKAGE="`pacman -Q | wc -l`"
KERNEL="`uname -r`"
MEM="`free -m | grep "buffers/" | awk {'print $3'}`"
FREQ=$(cpufreq-info | grep "current CPU frequency" | awk '{print $5"MHz"}')
VOL="$(exec amixer get Master | egrep -o "[0-9]+%" | head -1 | egrep -o "[0-9]*")%"
HOME="$(df /dev/sda4 | awk '/^\/dev/{printf "%s ", $5}' | sed '$s/.$//')"
@ivoarch
ivoarch / Gnome 3.20 repository for CentOSRHEL 7.x.md
Created October 28, 2016 11:39 — forked from mongoltolbo/Gnome 3.20 repository for CentOSRHEL 7.x.md
Welcome to the Gnome 3.20 repository for CentOSRHEL 7.x.

Since Red Hat spoiled us with RHEL 7.2 by rebasing Gnome, but will not be again updating Gnome for 7.3, I felt I would continue that action for them.

CentOS/RHEL is a great platform to work with, but on a workstation it feels out of date. I intended to fix that. So I built Gnome 3.20 and its dependencies for that platform.

Welcome to the Gnome 3.20 repository for CentOS/RHEL 7.x.

@ivoarch
ivoarch / live-usb-install-beesu.patch
Created November 25, 2016 21:18
Add support for beesu - (su) graphical interface for Rhel/Fedora .
--- live-usb-install-orig.py 2016-05-15 13:18:34.000000000 +0200
+++ live-usb-install.py 2016-11-25 22:03:37.951168584 +0100
@@ -2997,6 +2997,8 @@
os.system('gksu -D %s ./live-usb-install.py' % '/usr/share/applications/live-usb-install.desktop' if os.path.exists('/usr/share/applications/live-usb-install.desktop') else _('live-usb-install'))
elif os.system('which kdesudo')==0:
os.system('kdesudo ./live-usb-install.py')
+ elif os.system('which beesu')==0:
+ os.system('beesu ./live-usb-install.py')
elif os.system('which sudo')==0:
password = getText('',_('LiveUSB Install requires root privileges. Please enter your password below.'),_('Password'), password = True)