Skip to content

Instantly share code, notes, and snippets.

@gilgamesh2k
gilgamesh2k / nano-enable-colors
Last active December 20, 2015 14:39
Enable nano syntax highlighting
sudo sed -i 's/# include/include/' /etc/nanorc
@gilgamesh2k
gilgamesh2k / nautilus-open-terminal
Last active December 20, 2015 14:39
nautilus-open-terminal
sudo yum install -y nautilus-open-terminal
@gilgamesh2k
gilgamesh2k / start.sh
Last active December 20, 2015 14:39
Customize GpuTest benchmark set
#!/bin/bash
tests=$(
zenity --list --text "Choose tests for benchmark" --checklist\
--height 250\
--column "Pick" --column "Tests"\
TRUE triangle\
TRUE plot3d\
TRUE pixmark_piano\
TRUE fur\
--separator=":"\
@gilgamesh2k
gilgamesh2k / install-iptraf.sh
Last active December 20, 2015 14:48
install-iptraf
sudo yum install -y iptraf
@gilgamesh2k
gilgamesh2k / install-ntop.sh
Created August 4, 2013 04:37
install-ntop
sudo yum install -y ntop
@gilgamesh2k
gilgamesh2k / install-nmon.sh
Created August 4, 2013 05:29
install-nmon
sudo yum install -y nmon
@gilgamesh2k
gilgamesh2k / bind-iotop-control-i.sh
Created August 4, 2013 07:31
Bind 'iotop -o' to Ctrl+i
bind '"\C-i":"sudo iotop -o\n"'
@gilgamesh2k
gilgamesh2k / perl-install-missing-module.sh
Created August 6, 2013 02:53
Install missing perl module
sudo yum install perl-CPAN
sudo perl -MCPAN -e 'install Sys::Syslog'
@gilgamesh2k
gilgamesh2k / conf.nanorc
Last active March 25, 2023 08:48
nano syntax highlighting for most configuration files including bashrc, and bash_profile, bash_historysave conf.nanorc under /usr/share/nano/add the following to the end of the file /etc/nanorc:=====================================================## Configuration filesinclude "/usr/share/nano/conf.nanorc"
# config file highlighting
syntax "conf" "bash_profile" "bash_history" "\rc$" "(\.|/|)control$" "(\.(repo|conf|config|cfg|cnf|rc|lst|list|defs|ini|desktop|mime|types|preset|cache|seat|service|htaccess)$|(^|/)(\w*crontab|mirrorlist|group|hosts|passwd|rpc|netconfig|shadow|fstab|inittab|inputrc|protocols|sudoers)$|conf.d/|.config/)"
# default text
color magenta "^.*$"
# special values
icolor brightblue "(^|\s|=)(default|true|false|on|off|yes|no)(\s|$)"
# keys
@gilgamesh2k
gilgamesh2k / .bashrc
Last active December 20, 2015 19:09
.bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
alias df='df -h'
alias grep='grep --color=always'