code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/bin/sh
### ====================================================================== ###
## ##
## Mobicents SMSC Test Server Bootstrap Script ##
## ... | Shell |
#!/bin/bash
#
# Copyright 2010 Google Inc. All Rights Reserved.
# Author: jcgregorio@google.com (Joe Gregorio)
#
# Creates the documentation set for the library by
# running pydoc on all the files in apiclient.
#
# Notes: You may have to update the location of the
# App Engine library for your local system.
set... | Shell |
echo "The following files are missing or are not checked in:"
hg st
echo "Enter to continue"
read -e YES
echo "The following files are missing from the MANIFEST file:"
cat MANIFEST | sort > sorted-manifest.txt
hg st --clean| sed "s/^C //" | grep -v "^v3" > sorted-allfiles.txt
diff sorted-allfiles.txt sorted-manifest.tx... | Shell |
# Set Hadoop-specific environment variables here.
# The only required environment variable is JAVA_HOME. All others are
# optional. When running a distributed configuration it is best to
# set JAVA_HOME in this file, so that it is correctly defined on
# remote nodes.
# The java implementation to use. Required.
exp... | Shell |
#
#/**
# * Copyright 2007 The Apache Software Foundation
# *
# * Licensed to the Apache Software Foundation (ASF) under one
# * or more contributor license agreements. See the NOTICE file
# * distributed with this work for additional information
# * regarding copyright ownership. The ASF licenses this file
# * to you... | Shell |
#!/bin/bash
pushd "$(dirname $0)" >/dev/null && source common.sh && popd >/dev/null
$PYTHON $TOOLS_DIR/console.py "$@"
| Shell |
#!/bin/bash
pushd "$(dirname $0)" >/dev/null && source common.sh && popd >/dev/null
if [ "$1" == "run" ]; then
shift
$PYTHON $APPENGINE_DIR/dev_appserver.py "$@"
else
$PYTHON $APPENGINE_DIR/appcfg.py "$@"
fi
| Shell |
#!/bin/bash
# Scripts in the tools/ directory should source this file with the line:
# pushd "$(dirname $0)" >/dev/null && source common.sh && popd >/dev/null
export TOOLS_DIR=$(pwd)
export PROJECT_DIR=$(dirname $TOOLS_DIR)
export APP_DIR=$PROJECT_DIR/app
for dir in \
"$APPENGINE_DIR" \
/usr/lib/google_appen... | Shell |
ant clean; ant release; adb install -r bin/MetaTracker-release.apk
| Shell |
#!/bin/bash
#
# Starts a basic web server on the port specified.
#
# ./serve.sh 3000 -> http://localhost:3000
#
# Copyright 2012 Eric Bidelman <ebidel@gmail.com>
port=$1
if [ $# -ne 1 ]
then
port=8000
fi
open http://localhost:$port/template.html && python -m SimpleHTTPServer $port;
| Shell |
#!/bin/sh
find $@ -printf "c=[%CD %CH:%CM:%CS] m=[%TD %TH:%TM:%TS] %s %p\n"
| Shell |
#!/bin/sh
is_same_file () {
[ "$1" = "$2" ] && return 0
[ -z "$1" ] || [ -z "$2" ] && return 1
[ -L "$1" ] && is_same_file "`readlink -eq "$1"`" "$2" && return 0
[ -L "$2" ] && is_same_file "$1" "`readlink -eq "$2"`" && return 0
return 1
}
is_same_file "$@" || exit $? | Shell |
#!/bin/sh
rep=http://admin-scripts.googlecode.com/svn/trunk/linux/
dst=/usr/bin/
[ "$1" = "-h" ] || [ "$1" = "--help" ] && echo "Usage: ${0##*/} {[OPTIONS] [TARGET/] {FILE}} ..." 1>&2 && exit
for f in "$@"; do
[ -z "$f" ] && continue
[ -z "${f##*/}" ] && [ -d "$f" ] && dst="$f" && continue # if f ends w... | Shell |
#!/bin/sh
#
# Installation/removal of common Kubuntu packages
#
# sudo apt-get remove ktorrent konversation kmail kontact korganizer kaddressbook kdepim-wizards
# sudo apt-get install kubuntu-restricted-extras smplayer non-free-codecs rar arj unrar-free p7zip-full krename kompare krusader
# sudo apt-get install w32co... | Shell |
#!/bin/sh
## Medibuntu
## # deb http://packages.medibuntu.org/ intrepid free non-free
## # deb-src http://packages.medibuntu.org/ intrepid free non-free
wget -O- http://packages.medibuntu.org/medibuntu-key.gpg | sudo apt-key add -
## Opera
## # deb http://deb.opera.com/opera/ stable non-free
wget -O- http://deb.op... | Shell |
#!/bin/sh
#
# Installation/removal of common Kubuntu packages
#
# sudo apt-get remove ktorrent konversation kmail kontact korganizer kaddressbook kdepim-wizards
# sudo apt-get install kubuntu-restricted-extras smplayer non-free-codecs rar arj unrar-free p7zip-full krename kompare krusader
# sudo apt-get install w32co... | Shell |
#!/bin/sh
## Medibuntu
## # deb http://packages.medibuntu.org/ intrepid free non-free
## # deb-src http://packages.medibuntu.org/ intrepid free non-free
wget -O- http://packages.medibuntu.org/medibuntu-key.gpg | sudo apt-key add -
## Opera
## # deb http://deb.opera.com/opera/ stable non-free
wget -O- http://deb.op... | Shell |
#!/bin/bash
[[ -z "$1" ]] && echo "Usage: `basename $0` share user [./dir] [options]" >&2 && exit 2
share=$1
user=$2
path=${share#//}
# remove //
cred=/etc/samba/cred/${path//\//.}
# replace all / with .
serv=${path%%/*}
# remove path (longest tail /*)
mdir=/mnt/${share#//}
mopt=credentials=$cred
[[... | Shell |
#!/bin/bash
# Based on https://help.ubuntu.com/community/AutomaticSecurityUpdates
ADMIN=
LOG="/var/log/${0##*/}.log"
[ -r "/etc/default/${0##*/}" ] && . "/etc/default/${0##*/}"
quit () {
[ -f "$TMP" ] && rm $TMP
exit $1
}
error () {
[ -f "$TMP" ] || TMP=/dev/stderr
report "$2 ($1)" | mailer ... | Shell |
#!/bin/bash
## Set variable in config file to given value, or comment it out.
##
## * The variable has to exist already in the config file.
## * Required GNU SED
OPT=`getopt -o nh --long unset,help -n "${0##*/}" -- "$@"` && eval set -- "$OPT" || exit 2
USE="Usage: ${0##*/} [OPTION]... {file} {variable} [value]
... | Shell |
#!/bin/sh
sudo aptitude install openssh-server
if [ -n "$1" ]; then
sudo sed -i "s/^\( *Port\)\( \+=\? *\| *=\? +\|=\).*/\1\2443/" /etc/ssh/sshd_config
grep "^ *Port \+" /etc/ssh/sshd_config
sudo /etc/init.d/ssh force-reload
fi
| Shell |
#!/bin/sh
[ -z "$2" ] && echo "Usage: ${0##*/} project version [destdir] [package] [mirror] [md5]" >&2 && exit 2
md5check() { ### [path/]file [hash] [checksum-file] [hash-mismatch-message]
local PKG MD5 CHK MSG RES
PKG="$1"; MD5="$2"; CHK="${3:-$PKG.md5}"; MSG="$4"
[ -z "$PKG" ] && echo "$0: missing file ... | Shell |
#!/bin/sh
is_same_file () {
[ "$1" = "$2" ] && return 0
[ -z "$1" ] || [ -z "$2" ] && return 1
[ -L "$1" ] && is_same_file "`readlink -eq "$1"`" "$2" && return 0
[ -L "$2" ] && is_same_file "$1" "`readlink -eq "$2"`" && return 0
return 1
}
is_same_file "$@" || exit $? | Shell |
#!/bin/sh
#args=
for arg in "$@"; do echo -n "\"$arg\" "; args="$args \"$arg\""; done; echo
#while [ -n "$1" ]; do echo -n "\"$1\" "; args="$args \"$1\""; shift; done; echo
#echo $args
#args=${args:1}
#export args
#export -p | Shell |
#!/bin/bash
T=`mktemp` && script -qc grub-md5-crypt "$T" && P=`grep -iv password "$T"` && { rm "$T"; setconfvar -- "${1:-/boot/grub/menu.lst}" password "--md5 $P"; }
| Shell |
#!/bin/bash
# Based on https://help.ubuntu.com/community/AutomaticSecurityUpdates
ADMIN=
LOG="/var/log/${0##*/}.log"
[ -r "/etc/default/${0##*/}" ] && . "/etc/default/${0##*/}"
quit () {
[ -f "$TMP" ] && rm $TMP
exit $1
}
error () {
[ -f "$TMP" ] || TMP=/dev/stderr
report "$2 ($1)" | mailer ... | Shell |
#!/bin/sh
[ -z "$2" ] && echo "Usage: ${0##*/} file filter [filter args..]" 2>&1 && exit 1
F="$1"; shift; T="`mktemp`" || exit 1
"$@" < "$F" >> "$T" && mv -fT -- "$T" "$F" && exit 0
[ -e "$T" ] && rm "$T"; exit 1
| Shell |
#!/bin/bash
## Set variable in config file to given value, or comment it out.
##
## * The variable has to exist already in the config file.
## * Required GNU SED
OPT=`getopt -o nh --long unset,help -n "${0##*/}" -- "$@"` && eval set -- "$OPT" || exit 2
USE="Usage: ${0##*/} [OPTION]... {file} {variable} [value]
... | Shell |
#!/bin/bash
fullpath () {
# fullpath(path=.)
[[ "/" == "${1:0:1}" ]] && echo "$1" || { pwd="`pwd`"; [[ -z "$1" ]] && echo "$pwd"; } || { [[ "." == "$1" || "./" == "${1:0:2}" ]] && echo "$pwd${1:1}"; } || { [[ ".." == "$1" || "../" == "${1:0:3}" ]] && echo "${pwd%/*}${1:2}" || echo "$pwd/$1"; }
}
fullcmd... | Shell |
#!/bin/bash
[ -z "$2" ] && echo "Usage: ${0##*/} {file} {variable}" >&2 && exit 1
grep -n "^ *#\? *$2\( \+=\? *\| *=\? \+\|=\)" "$1"
| Shell |
#!/bin/sh
echo $@
echo $*
echo "$@"
echo "$*"
echo
echo "\$# = $#" # count
echo "\${!#} = ${!#}" # last
echo -n "args \$@ = "; args $@
echo -n "args \$* = "; args $*
echo -n "args \"\$@\" = "; args "$@"
echo -n "args \"\$*\" = "; args "$*"
a=$@
echo "\$@ ... | Shell |
#!/bin/sh
rep=http://admin-scripts.googlecode.com/svn/trunk/linux/
dst=/usr/bin/
[ "$1" = "-h" ] || [ "$1" = "--help" ] && echo "Usage: ${0##*/} {[OPTIONS] [TARGET/] {FILE}} ..." 1>&2 && exit
for f in "$@"; do
[ -z "$f" ] && continue
[ -z "${f##*/}" ] && [ -d "$f" ] && dst="$f" && continue # if f ends w... | Shell |
#!/bin/sh
find $@ -printf "c=[%CD %CH:%CM:%CS] m=[%TD %TH:%TM:%TS] %s %p\n"
| Shell |
#!/bin/bash
[[ -z "$1" ]] && echo "Usage: `basename $0` share user [./dir] [options]" >&2 && exit 2
share=$1
user=$2
path=${share#//}
# remove //
cred=/etc/samba/cred/${path//\//.}
# replace all / with .
serv=${path%%/*}
# remove path (longest tail /*)
mdir=/mnt/${share#//}
mopt=credentials=$cred
[[... | Shell |
#!/bin/sh
[ -z "$2" ] && echo "Usage: ${0##*/} file filter [filter args..]" 2>&1 && exit 1
F="$1"; shift; T="`mktemp`" || exit 1
"$@" < "$F" >> "$T" && mv -fT -- "$T" "$F" && exit 0
[ -e "$T" ] && rm "$T"; exit 1
| Shell |
#!/bin/sh
[ -z "$2" ] && echo "Usage: ${0##*/} project version [destdir] [package] [mirror] [md5]" >&2 && exit 2
md5check() { ### [path/]file [hash] [checksum-file] [hash-mismatch-message]
local PKG MD5 CHK MSG RES
PKG="$1"; MD5="$2"; CHK="${3:-$PKG.md5}"; MSG="$4"
[ -z "$PKG" ] && echo "$0: missing file ... | Shell |
#!/bin/sh
invoke-rc.d openntpd stop
ntpdate -v 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
invoke-rc.d openntpd start
| Shell |
#!/bin/sh
URL=http://stardict.sourceforge.net/Dictionaries_dictd-www.dict.org.php
ARC="stardict-*.tar.bz2"
DLD=/var/cache/dictionaries-stardict
DST=/usr/share/stardict/dic
get_all () {
[ -z "$5" ] && echo "Usage: get_all label url filemask download-dir extract-dir [extract-mask]" >&2 && return 1
echo "Downlo... | Shell |
#!/bin/sh
[ -n "$JAVA_HOME" ] || { JAVA_HOME="$(readlink -e $(which java))" && JAVA_HOME="${JAVA_HOME%%/jre/bin/java}" && JAVA_HOME="${JAVA_HOME%%/bin/java}"; }
VER="${1:-8.3-604}"
TYP="${2:-jdbc3}"
ARC="postgresql-$VER.$TYP.jar"
URL="http://jdbc.postgresql.org/download/$ARC"
DLD="$JAVA_HOME/jre/lib/ext"
OPT="-t1 --c... | Shell |
#!/bin/sh
## English-Czech GNU FDL dictionary and Czech foreign words dictionary
## # see http://cz.cihar.com/software/slovnik/
## # see http://forum.ubuntu.cz/index.php?topic=1008.0
## # see http://www.abclinuxu.cz/clanky/tipy/-nielen-anglicko-ceske-slovnikove-databazy-pre-stardict
## # deb http://debian.cihar.co... | Shell |
#!/bin/sh
# http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=16942
# http://www.jboss.org/jbossas/downloads/
VER="${1:-5.1.0.GA-jdk6}"
MD5="${1:+ca64add783eb38c123ddb0dcd8465e3f}"
ARC="jboss-$VER.zip"
DIR="jboss-${VER%-jdk*}"
DLD="/var/cache/install"
DST="/usr/lib"
md5check() { ### [path/]file ... | Shell |
#!/bin/sh
sudo aptitude install openssh-server
if [ -n "$1" -a "$1" != "22" ]; then
sudo sed -i "s/^\( *Port\)\( \+=\? *\| *=\? +\|=\).*/\1\2$1/" /etc/ssh/sshd_config
grep "^ *Port \+" /etc/ssh/sshd_config
sudo invoke-rc.d ssh force-reload
fi
| Shell |
#!/bin/sh
## English-Czech GNU FDL dictionary and Czech foreign words dictionary
## # see http://cz.cihar.com/software/slovnik/
## # see http://forum.ubuntu.cz/index.php?topic=1008.0
## # see http://www.abclinuxu.cz/clanky/tipy/-nielen-anglicko-ceske-slovnikove-databazy-pre-stardict
## # deb http://debian.cihar.co... | Shell |
#!/bin/sh
## /etc/init.d/n2n-edge: start and stop the n2n edge
##
## modified from http://wiki.freifunk.net/N2n
N2N_IF=${0##*/}
N2N_CMD="/usr/bin/edge"
N2N_LOG="/var/log/$N2N_IF.log"
N2N_HTTPTUNNEL=0
N2N_ROUTING=0
N2N_VERBOSE=0
N2N_NETMASK=255.255.255.0
N2N_UID=99
N2N_GID=99
[ -r "/etc/default/$N2N_IF" ] && . "/etc... | Shell |
#!/bin/sh
compiz_on () {
compiz --replace &
#gconf
which gnome-window-decorator && gnome-window-decorator &
which avant-window-navigator && { sleep 3; avant-window-navigator & }
}
compiz_off () {
killall -TERM gnome-window-decorator
killall -TERM avant-window-navigator
metacity --... | Shell |
#!/bin/sh
# http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=16942
# http://www.jboss.org/jbossas/downloads/
VER="${1:-5.1.0.GA-jdk6}"
MD5="${1:+ca64add783eb38c123ddb0dcd8465e3f}"
ARC="jboss-$VER.zip"
DIR="jboss-${VER%-jdk*}"
DLD="/var/cache/install"
DST="/usr/lib"
md5check() { ### [path/]file ... | Shell |
#!/bin/sh
[ -n "$JAVA_HOME" ] || { JAVA_HOME="$(readlink -e $(which java))" && JAVA_HOME="${JAVA_HOME%%/jre/bin/java}" && JAVA_HOME="${JAVA_HOME%%/bin/java}"; }
VER="${1:-2.0b4}"
ARC="bsh-$VER.jar"
REF="http://www.beanshell.org/download.html"
DLD="$JAVA_HOME/jre/lib/ext"
OPT="-t1 --connect-timeout=5 -a $DLD/$ARC.log"... | Shell |
#!/bin/sh
URL=http://stardict.sourceforge.net/Dictionaries_dictd-www.dict.org.php
ARC="stardict-*.tar.bz2"
DLD=/var/cache/dictionaries-stardict
DST=/usr/share/stardict/dic
get_all () {
[ -z "$5" ] && echo "Usage: get_all label url filemask download-dir extract-dir [extract-mask]" >&2 && return 1
echo "Downlo... | Shell |
#!/bin/sh
REP="https://svn.ntop.org/svn/ntop/trunk/n2n"
DLD="/var/cache/install/n2n"
MAK="$DLD/scripts/mk_deb.sh"
echo == Checkout $REP to $DLD
[ -d "$DLD" ] || mkdir -p "$DLD" || exit 1
aptitude install -y subversion
cd "$DLD"
svn co "$REP" . || exit $?
[ ! -f "$MAK" ] && echo !! Cannot find make script $MAK. >... | Shell |
#!/bin/sh -ex
# see http://www.fifi.org/doc/debconf-doc/tutorial.html
# this script expects to be located in current working directory (`pwd`)
PKG=shared
VAR=accepted-sun-dlj-v1-1
TPL="$0.templates"
export PATH="`pwd`:$PATH"
chmod +x "$0"
echo "Template: $PKG/$VAR\nType: boolean" > "$TPL"
. /usr/share/debconf/con... | Shell |
#!/bin/sh
aptitude install "$@" openntpd unattended-upgrades
invoke-rc.d openntpd stop
ntpdate -v 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
invoke-rc.d openntpd start
| Shell |
#!/bin/sh
invoke-rc.d openntpd stop
ntpdate -v 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
invoke-rc.d openntpd start
| Shell |
#!/bin/sh
[ -n "$JAVA_HOME" ] || { JAVA_HOME="$(readlink -e $(which java))" && JAVA_HOME="${JAVA_HOME%%/jre/bin/java}" && JAVA_HOME="${JAVA_HOME%%/bin/java}"; }
VER="${1:-8.3-604}"
TYP="${2:-jdbc3}"
ARC="postgresql-$VER.$TYP.jar"
URL="http://jdbc.postgresql.org/download/$ARC"
DLD="$JAVA_HOME/jre/lib/ext"
OPT="-t1 --c... | Shell |
#!/bin/sh
[ -n "$JAVA_HOME" ] || { JAVA_HOME="$(readlink -e $(which java))" && JAVA_HOME="${JAVA_HOME%%/jre/bin/java}" && JAVA_HOME="${JAVA_HOME%%/bin/java}"; }
ARC="jwhich.tar.gz"
REF="http://www.fullspan.com/proj/jwhich/"
DLD="/var/cache/install"
DST="$JAVA_HOME/jre/lib/ext"
LST="jwhich.jar"
OPT="-t1 --connect-time... | Shell |
#!/bin/sh
VER="${1:-2.5.1}"
MD5="${1:+2ee978eff4306b23753b3fe9d7af5b37}"
ARC="jython_installer-$VER.jar"
DLD="/var/cache/install"
DST="/usr/lib/jython"
TMP="/var/cache/jython"
md5check() { ### [path/]file [hash] [checksum-file] [hash-mismatch-message]
local PKG MD5 CHK MSG RES
PKG="$1"; MD5="$2"; CHK="${3:-$P... | Shell |
#!/bin/sh
while [ -n "$1" ]; do
sudo useradd "$1" -s /bin/bash -m -G adm,dialout,cdrom,plugdev,lpadmin,admin,sambashare
sudo passwd "$1"
shift
done | Shell |
#!/bin/sh
URL=http://stardict.sourceforge.net/download.php
ARC="*TTS.tar.bz2"
DLD=/var/cache/dictionaries-stardict
DST=/usr/share
get_all () {
[ -z "$5" ] && echo "Usage: get_all label url filemask download-dir extract-dir [extract-mask]" >&2 && return 1
echo "Downloading $3 from $2"
[ -d "$4" ] || mkdi... | Shell |
#!/bin/sh
aptitude install "$@" openssh-server openntpd unattended-upgrades bash-completion man nano
invoke-rc.d openntpd stop
ntpdate -v 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
invoke-rc.d openntpd start
| Shell |
#!/bin/sh
# Installs Sun Java 6, required build tools, Openfire XMPP server, Protocol Buffers
# and Wave Reference Server on Debian/Ubuntu
# Contact: jan.killian at gmail ... bugs/patches/enhancements/requests are welcome
# References:
# http://code.google.com/p/wave-protocol/wiki/Installation
# http://jamespurser.c... | Shell |
#!/bin/bash
[ -n "$JAVA_HOME" ] || { JAVA_HOME="$(readlink -e $(which java))" && JAVA_HOME="${JAVA_HOME%%/jre/bin/java}" && JAVA_HOME="${JAVA_HOME%%/bin/java}"; }
VER="${1:-10.2.0.4}"
TYP="${2:-ojdbc14}"
ARC="$TYP.jar"
URL="http://download.oracle.com/otn/utilities_drivers/jdbc/${VER//./}/$ARC"
DLD="$JAVA_HOME/jre/lib... | Shell |
#! /bin/sh
### BEGIN INIT INFO
# Provides: move-to-another-device
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Moves mountpoints to a new devices according to fstab
# Description: Moves all mountpoints listed in /etc/move-to-another-device.list
# to... | Shell |
#!/bin/sh
[ -n "$JAVA_HOME" ] || { JAVA_HOME="$(readlink -e $(which java))" && JAVA_HOME="${JAVA_HOME%%/jre/bin/java}" && JAVA_HOME="${JAVA_HOME%%/bin/java}"; }
ARC="jwhich.tar.gz"
REF="http://www.fullspan.com/proj/jwhich/"
DLD="/var/cache/install"
DST="$JAVA_HOME/jre/lib/ext"
LST="jwhich.jar"
OPT="-t1 --connect-time... | Shell |
#! /bin/sh
### BEGIN INIT INFO
# Provides: move-to-another-device
# Required-Start:
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Moves mountpoints to a new devices according to fstab
# Description: Moves all mountpoints listed in /etc/move-to-another-device.list
# to... | Shell |
#!/bin/sh
#
# Installation/removal of common Ubuntu packages
#
# sudo apt-get install compizconfig-settings-manager # or: simple-ccsm was: ccsm
# sudo apt-get install ubuntu-restricted-extras non-free-codecs rar arj unrar-free p7zip-full adobe-flashplugin
# sudo apt-get install w32codecs
# sudo apt-get install w64co... | Shell |
#!/bin/sh
## Medibuntu
## # deb http://packages.medibuntu.org/ intrepid free non-free
## # deb-src http://packages.medibuntu.org/ intrepid free non-free
wget -O- http://packages.medibuntu.org/medibuntu-key.gpg | sudo apt-key add -
## Opera
## # deb http://deb.opera.com/opera/ stable non-free
wget -O- http://deb.op... | Shell |
#!/bin/sh
#
# Installation/removal of common Ubuntu packages
#
# sudo apt-get install compizconfig-settings-manager # or: simple-ccsm was: ccsm
# sudo apt-get install ubuntu-restricted-extras non-free-codecs rar arj unrar-free p7zip-full adobe-flashplugin
# sudo apt-get install w32codecs
# sudo apt-get install w64co... | Shell |
#!/bin/sh
## Medibuntu
## # deb http://packages.medibuntu.org/ intrepid free non-free
## # deb-src http://packages.medibuntu.org/ intrepid free non-free
wget -O- http://packages.medibuntu.org/medibuntu-key.gpg | sudo apt-key add -
## Opera
## # deb http://deb.opera.com/opera/ stable non-free
wget -O- http://deb.op... | Shell |
#!/bin/sh
aptitude install "$@" openssh-server openntpd unattended-upgrades bash-completion man nano
invoke-rc.d openntpd stop
ntpdate -v 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
invoke-rc.d openntpd start
| Shell |
#!/bin/sh
aptitude install "$@" openntpd unattended-upgrades
invoke-rc.d openntpd stop
ntpdate -v 0.debian.pool.ntp.org 1.debian.pool.ntp.org 2.debian.pool.ntp.org 3.debian.pool.ntp.org
invoke-rc.d openntpd start
| Shell |
#!/bin/sh
while [ -n "$1" ]; do
sudo useradd "$1" -s /bin/bash -m -G adm,dialout,cdrom,plugdev,lpadmin,admin,sambashare
sudo passwd "$1"
shift
done | Shell |
#!/bin/sh
URL=http://stardict.sourceforge.net/download.php
ARC="*TTS.tar.bz2"
DLD=/var/cache/dictionaries-stardict
DST=/usr/share
get_all () {
[ -z "$5" ] && echo "Usage: get_all label url filemask download-dir extract-dir [extract-mask]" >&2 && return 1
echo "Downloading $3 from $2"
[ -d "$4" ] || mkdi... | Shell |
#!/bin/sh
VER="${1:-2.5.1}"
MD5="${1:+2ee978eff4306b23753b3fe9d7af5b37}"
ARC="jython_installer-$VER.jar"
DLD="/var/cache/install"
DST="/usr/lib/jython"
TMP="/var/cache/jython"
md5check() { ### [path/]file [hash] [checksum-file] [hash-mismatch-message]
local PKG MD5 CHK MSG RES
PKG="$1"; MD5="$2"; CHK="${3:-$P... | Shell |
#!/bin/sh
REP="https://svn.ntop.org/svn/ntop/trunk/n2n"
DLD="/var/cache/install/n2n"
MAK="$DLD/scripts/mk_deb.sh"
echo == Checkout $REP to $DLD
[ -d "$DLD" ] || mkdir -p "$DLD" || exit 1
aptitude install -y subversion
cd "$DLD"
svn co "$REP" . || exit $?
[ ! -f "$MAK" ] && echo !! Cannot find make script $MAK. >... | Shell |
#!/bin/sh
## /etc/init.d/n2n-edge: start and stop the n2n edge
##
## modified from http://wiki.freifunk.net/N2n
N2N_IF=${0##*/}
N2N_CMD="/usr/bin/edge"
N2N_LOG="/var/log/$N2N_IF.log"
N2N_HTTPTUNNEL=0
N2N_ROUTING=0
N2N_VERBOSE=0
N2N_NETMASK=255.255.255.0
N2N_UID=99
N2N_GID=99
[ -r "/etc/default/$N2N_IF" ] && . "/etc... | Shell |
#!/bin/bash
[ -n "$JAVA_HOME" ] || { JAVA_HOME="$(readlink -e $(which java))" && JAVA_HOME="${JAVA_HOME%%/jre/bin/java}" && JAVA_HOME="${JAVA_HOME%%/bin/java}"; }
VER="${1:-10.2.0.4}"
TYP="${2:-ojdbc14}"
ARC="$TYP.jar"
URL="http://download.oracle.com/otn/utilities_drivers/jdbc/${VER//./}/$ARC"
DLD="$JAVA_HOME/jre/lib... | Shell |
#!/bin/sh
compiz_on () {
compiz --replace &
#gconf
which gnome-window-decorator && gnome-window-decorator &
which avant-window-navigator && { sleep 3; avant-window-navigator & }
}
compiz_off () {
killall -TERM gnome-window-decorator
killall -TERM avant-window-navigator
metacity --... | Shell |
#!/bin/sh
# Installs Sun Java 6, required build tools, Openfire XMPP server, Protocol Buffers
# and Wave Reference Server on Debian/Ubuntu
# Contact: jan.killian at gmail ... bugs/patches/enhancements/requests are welcome
# References:
# http://code.google.com/p/wave-protocol/wiki/Installation
# http://jamespurser.c... | Shell |
#!/bin/sh -ex
# see http://www.fifi.org/doc/debconf-doc/tutorial.html
# this script expects to be located in current working directory (`pwd`)
PKG=shared
VAR=accepted-sun-dlj-v1-1
TPL="$0.templates"
export PATH="`pwd`:$PATH"
chmod +x "$0"
echo "Template: $PKG/$VAR\nType: boolean" > "$TPL"
. /usr/share/debconf/con... | Shell |
#!/bin/sh
[ -n "$JAVA_HOME" ] || { JAVA_HOME="$(readlink -e $(which java))" && JAVA_HOME="${JAVA_HOME%%/jre/bin/java}" && JAVA_HOME="${JAVA_HOME%%/bin/java}"; }
VER="${1:-2.0b4}"
ARC="bsh-$VER.jar"
REF="http://www.beanshell.org/download.html"
DLD="$JAVA_HOME/jre/lib/ext"
OPT="-t1 --connect-timeout=5 -a $DLD/$ARC.log"... | Shell |
#!/bin/sh
sudo aptitude install openssh-server
if [ -n "$1" -a "$1" != "22" ]; then
sudo sed -i "s/^\( *Port\)\( \+=\? *\| *=\? +\|=\).*/\1\2$1/" /etc/ssh/sshd_config
grep "^ *Port \+" /etc/ssh/sshd_config
sudo invoke-rc.d ssh force-reload
fi
| Shell |
#!/bin/bash
T=`mktemp` && script -qc grub-md5-crypt "$T" && P=`grep -iv password "$T"` && { rm "$T"; setconfvar -- "${1:-/boot/grub/menu.lst}" password "--md5 $P"; }
| Shell |
#!/bin/bash
fullpath () {
# fullpath(path=.)
[[ "/" == "${1:0:1}" ]] && echo "$1" || { pwd="`pwd`"; [[ -z "$1" ]] && echo "$pwd"; } || { [[ "." == "$1" || "./" == "${1:0:2}" ]] && echo "$pwd${1:1}"; } || { [[ ".." == "$1" || "../" == "${1:0:3}" ]] && echo "${pwd%/*}${1:2}" || echo "$pwd/$1"; }
}
fullcmd... | Shell |
#!/bin/bash
[ -z "$2" ] && echo "Usage: ${0##*/} {file} {variable}" >&2 && exit 1
grep -n "^ *#\? *$2\( \+=\? *\| *=\? \+\|=\)" "$1"
| Shell |
#!/bin/sh
sudo aptitude install openssh-server
if [ -n "$1" ]; then
sudo sed -i "s/^\( *Port\)\( \+=\? *\| *=\? +\|=\).*/\1\2443/" /etc/ssh/sshd_config
grep "^ *Port \+" /etc/ssh/sshd_config
sudo /etc/init.d/ssh force-reload
fi
| Shell |
#!/bin/sh
#args=
for arg in "$@"; do echo -n "\"$arg\" "; args="$args \"$arg\""; done; echo
#while [ -n "$1" ]; do echo -n "\"$1\" "; args="$args \"$1\""; shift; done; echo
#echo $args
#args=${args:1}
#export args
#export -p | Shell |
#!/bin/sh
echo $@
echo $*
echo "$@"
echo "$*"
echo
echo "\$# = $#" # count
echo "\${!#} = ${!#}" # last
echo -n "args \$@ = "; args $@
echo -n "args \$* = "; args $*
echo -n "args \"\$@\" = "; args "$@"
echo -n "args \"\$*\" = "; args "$*"
a=$@
echo "\$@ ... | Shell |
#!/bin/sh
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
gcc $(go env GOGCCFLAGS) -shared -o libcgosotest.so cgoso_c.c
go build main.go
LD_LIBRARY_PATH=. ./main
rm -f libcgosotest.so main
| Shell |
#!/bin/sh
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
go build hello.go
go build fib.go
go build chain.go
echo '*' hello >run.out
./hello >>run.out
echo '*' fib >>run.out
./fib >>run.out
echo '*' ch... | Shell |
#!/bin/sh
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
go build -o life main.go
echo '*' life >run.out
./life >>run.out
diff run.out golden.out
rm -f life
| Shell |
#!/usr/bin/env bash
# Copyright 2010 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# This is a small script for executing go binaries on the android platform.
#
# example:
# ./a 5.out foo bar baz
#
# The script exports the l... | Shell |
#!/bin/bash
GOROOT=/usr/local/go
echo "Fixing permissions"
cd $GOROOT
find . -exec chmod ugo+r \{\} \;
find bin -exec chmod ugo+rx \{\} \;
find . -type d -exec chmod ugo+rx \{\} \;
chmod o-w .
echo "Fixing debuggers via sudo.bash"
# setgrp procmod the debuggers (sudo.bash)
cd $GOROOT/src
./sudo.bash
echo "Installin... | Shell |
#!/bin/bash
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
if ! test -f ../../src/all.bash; then
echo >&2 "package.bash must be run from $GOROOT/misc/osx"
exit 1
fi
echo >&2 "Locating PackageMaker...... | Shell |
#!/bin/sh
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
case "$1" in
-*)
echo 'usage: benchcmp old.txt new.txt' >&2
echo >&2
echo 'Each input file should be go test -test.run=NONE -test.bench=. > [old,new... | Shell |
#!/usr/bin/env bash
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Illustrates how a Go language specification can be installed for Xcode 4.x.,
# to enable syntax coloring, by adding an entry to a plugindata... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
case "`uname`" in
Darwin)
;;
*)
exit 0
esac
eval $(go env)
if ! [ -x $GOTOOLDIR/cov -a -x $GOTOOLDIR/prof ]; then
echo "You don't n... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
if [ ! -f make.bash ]; then
echo 'all.bash must be run from $GOROOT/src' 1>&2
exit 1
fi
. ./make.bash --no-banner
bash run.bash --no-r... | Shell |
#!/bin/rc -e
# Copyright 2012 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
eval `{go tool dist env -9}
if(! test -x $GOTOOLDIR/dist){
echo 'cannot find $GOTOOLDIR/dist; nothing to clean' >[1=2]
exit noclean
}
$GOBIN/go cl... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Environment variables that control make.bash:
#
# GOROOT_FINAL: The expected final Go root, baked into binaries.
# The default is the locatio... | Shell |
#!/bin/sh
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
trap "rm -f arch_GOARCH.h defs_GOOS_GOARCH.h os_GOOS.h signals_GOOS.h" EXIT INT TERM
set -e
SYS=$1
export GOOS=$(echo $SYS | sed 's/_.*//')
export GOARC... | Shell |
#!/usr/bin/env bash
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Generate Go code listing errors and other #defined constant
# values (ENAMETOOLONG etc.), by asking the preprocessor
# about the definitions.... | Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.