Skip to content

Instantly share code, notes, and snippets.

@alex-endfinger
alex-endfinger / release.conf
Created December 31, 2011 16:47
Latest Ubuntu Release File
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=11.10
DISTRIB_CODENAME=oneiric
DISTRIB_DESCRIPTION="Ubuntu Oneiric"
DEV_DISTRIB_ID=Ubuntu
DEV_DISTRIB_RELEASE=12.04
DEV_DISTRIB_CODENAME=precise
DEV_DISTRIB_DESCRIPTION="Ubuntu precise (development branch)"
@alex-endfinger
alex-endfinger / installnano.sh
Created December 22, 2011 16:32
Installs the nano text editor on Chrome OS
#!/bin/sh
sudo echo -n
sudo mkdir /tmp/nano
cd /tmp/nano
sudo wget http://v48.googlecode.com/files/nano.tar.gz
sudo tar -zxvf nano.tar.gz
sudo mv ./nano /usr/bin
sudo rm -rf /tmp/nano
USE="3dnow acpi dedicated ethereal faad ffmpeg firebird freetype gtkhtml \
apache2 xsl mysql mng openssh tiff -arts -kde -qt eds gd dba"
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -Os -pipe -fstack-protector"
CXXFLAGS="${CFLAGS}"
ACCEPT_KEYWORDS="~x86"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
#!/bin/bash
function printstatus {
clear
ps auxww |grep " dd " |grep -v grep |awk '{print $2}' |while read pid; do kill -USR1 $pid; done
sleep 5
printstatus
}
printstatus
ps auxww |grep " dd " |grep -v grep |awk '{print $2}' |while read pid; do kill -USR1 $pid; done
59 * * * * ls
4/6GmwY0A7nKcI11or0Y_1arl-tV6df
@alex-endfinger
alex-endfinger / bashrc
Created October 1, 2011 23:44
.bashrc
# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
#!/bin/bash
echo "Scanning TCP ports..."
for p in {1..1023}
do
(echo >/dev/tcp/localhost/$p) >/dev/null 2>&1 && echo "$p is open!"
done