Skip to content

Instantly share code, notes, and snippets.

@gilgamesh2k
gilgamesh2k / install-java-sources
Created November 10, 2014 11:52
Install Java sources to Eclipse
#!/bin/bash
sudo yum install java-1.7.0-openjdk-src
@gilgamesh2k
gilgamesh2k / fedora20post.sh
Created July 7, 2014 14:54
Fedora 20 post installation script
#!/bin/bash
if [ $EUID -ne 0 ]; then
echo "you have to run this with sudo..."
exit -1
fi
# Fedora 19 Post Installation Script
echo "[!] Installing yum-plugin-fastestmirror..."
@gilgamesh2k
gilgamesh2k / fedora19post.sh
Last active December 31, 2015 09:58
Fedora 19 post installation script
#!/bin/bash
if [ $EUID -ne 0 ]; then
echo "you have to run this with sudo..."
exit -1
fi
# Fedora 19 Post Installation Script
echo "[!] Installing yum-plugin-fastestmirror..."
@gilgamesh2k
gilgamesh2k / fun.sh
Created August 9, 2013 02:57
Functional bash, just a little :-) add to .bashrc: source fun.sh
#!/bin/bash
print() {
while read x; do
echo $x
done
}
list() {
for elem; do
echo "$elem"
@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'
@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 / 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 / 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 / install-nmon.sh
Created August 4, 2013 05:29
install-nmon
sudo yum install -y nmon
@gilgamesh2k
gilgamesh2k / install-ntop.sh
Created August 4, 2013 04:37
install-ntop
sudo yum install -y ntop