This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install reqs | |
su -c 'yum -y install fedora-kickstarts livecd-tools' | |
# create live image | |
su -c 'livecd-creator -c /usr/share/spin-kickstarts/fedora-install-fedora.ks -d -f filesystem_label --title=syslinux-title --releasever=19 -t tmp --cache=cache --logfile=image_creator.log' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Credits to http://blog.viktorkelemen.com/2011/07/get-links-from-page-with-bash.html | |
URL=$1 | |
curl ${URL} 2>&1 | grep -o -E 'src="http://www.youtube([^"#]+)"' | cut -d'"' -f2 | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
URL="https://play.google.com/store/devices/details?id=" | |
MODELS="nexus_5_16gb nexus_5_black_16gb nexus_5_white_16gb nexus_5_32gb nexus_5_black_32gb nexus_5_white_32gb" | |
TMPDIR="/home/myself/nexus5" | |
MAILS="some@email another@mail" | |
for model in ${MODELS} | |
do | |
OLD=${TMPDIR}/${model}_old | |
NEW=${TMPDIR}/${model}_new | |
/usr/bin/curl -s "${URL}${model}" -o ${NEW} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum distro-sync | |
package-cleanup –problems | |
package-cleanup –orphans | |
rpmconf -a -fmeld | |
rpmorphan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yum install -y mlocate | |
/etc/cron.daily/mlocate.cron | |
locate \* >> /tmp/before.txt | |
# install whatever | |
/etc/cron.daily/mlocate.cron | |
locate \* >> /tmp/after.txt | |
diff /tmp/before.txt /tmp/after.txt | |
find / -newer /tmp/before.txt 2 > /dev/null | egrep -v "\/sys|\/proc|\/dev|\/tmp" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#from crypt import crypt | |
#set $rpwd = $getVar('$password_root', None) | |
#if $rpwd | |
#set $rootpassword = crypt($rpwd, "$1$salt") | |
sed -i -e 's#^rootpw.*#rootpw --iscrypted $rootpassword#g' /tmp/ks.cfg | |
#end if |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir -p /var/distro-trees/CentOS-6.3-x86_64 | |
cd /var/distro-trees/CentOS-6.3-x86_64 | |
wget -e robots=off -r -nH --cut-dirs=3 --no-parent --reject "index.html*" http://centos.mirror.linuxwerk.com/6.3/os/x86_64/images/ | |
wget -e robots=off -r -nH --cut-dirs=3 --no-parent --reject "index.html*" http://centos.mirror.linuxwerk.com/6.3/os/x86_64/isolinux/ | |
wget -e robots=off -r -nH --cut-dirs=3 --no-parent --reject "index.html*" http://centos.mirror.linuxwerk.com/6.3/os/x86_64/repodata/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exec < /dev/tty6 > /dev/tty6 2> /dev/tty6 | |
chvt 6 | |
#!/bin/sh | |
echo | |
CONFIRM=no | |
while [ "$CONFIRM" != "y" ] | |
do | |
echo -n "Hostname: " | |
read HOSTNAME | |
if [ "$HOSTNAME" == "" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.reddit.com/r/linux/comments/27buyv/i_just_leaned_about_man_html/ | |
function yell { | |
figlet -f slant "$@" | sed "s/\(.\+\)/ \1/g" | |
} | |
function manopt { | |
man $1 | sed 's/.\x08//g' | sed -n "/^\s\+-\+$2\b/,/^\s*$/p" | sed '$d;'; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
arecord -f S16_LE -r 22500 | ssh -C user@raspberrypi "sudo /home/user/pifm/pifm - 101.6" |
OlderNewer