code
stringlengths
1
1.96M
language
stringclasses
1 value
# Dungeon map interface # Akalabeth Re-Bourne # Copyright (C) 2008 Norman B. Lancaster # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at y...
Shell
# Dungeon view handler # Akalabeth Re-Bourne # Copyright (C) 2008 Norman B. Lancaster # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
Shell
#! /bin/bash # Akalabeth Re-Bourne # Copyright (C) 2008 Norman B. Lancaster # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
Shell
#! /bin/bash # Akalabeth Re-Bourne # Copyright (C) 2008 Norman B. Lancaster # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
Shell
#!/bin/sh if [[ -z $ADB ]]; then ADB=adb; fi ./kill_process.sh $ADB shell rm -r /data/data/com.google.android.apps.iosched/*
Shell
#!/bin/sh adb shell cat /data/data/com.google.android.apps.iosched/shared_prefs/com.google.android.apps.iosched_preferences.xml | xmllint --format -
Shell
#!/bin/sh if [[ -z $ADB ]]; then ADB=adb; fi $ADB shell am start \ -a android.intent.action.MAIN \ -c android.intent.category.LAUNCHER \ -n com.google.android.apps.iosched/.ui.HomeActivity
Shell
#!/bin/sh adb shell pm clear com.google.android.apps.iosched
Shell
#!/bin/sh if [[ -z $ADB ]]; then ADB=adb; fi $ADB shell am force-stop com.google.android.apps.iosched
Shell
#!/bin/sh if [[ -z $ADB ]]; then ADB=adb; fi MAC_UNAME="Darwin" if [[ "`uname`" == ${MAC_UNAME} ]]; then DATE_FORMAT="%Y-%m-%dT%H:%M:%S" else DATE_FORMAT="%Y-%m-%d %H:%M:%S" fi if [ -z "$1" ]; then NOW_DATE=$(date "+${DATE_FORMAT}") echo Please provide a mock time in the format \"${NOW_DATE}\" or \"d\" to del...
Shell
#!/bin/sh # Remember VERBOSE only works on debug builds of the app adb shell setprop log.tag.iosched_SyncHelper VERBOSE adb shell setprop log.tag.iosched_SessionsHandler VERBOSE adb shell setprop log.tag.iosched_ImageCache VERBOSE adb shell setprop log.tag.iosched_ImageWorker VERBOSE adb shell setprop log.tag.iosched_I...
Shell
#!/bin/sh if [[ -z $ADB ]]; then ADB=adb; fi $ADB shell "echo '$*' | sqlite3 -header -column /data/data/com.google.android.apps.iosched/databases/schedule.db"
Shell
#!/bin/sh # Sessions list #adb shell am start -a android.intent.action.VIEW -d content://com.google.android.apps.iosched/tracks/android/sessions # Vendors list #adb shell am start -a android.intent.action.VIEW -d content://com.google.android.apps.iosched/tracks/android/vendors # Session detail #adb shell am start -a...
Shell
#!/bin/sh DIRECTORY=$(cd `dirname $0` && pwd) GIT_DIR="$DIRECTORY"/osmand-git GIT_URL=git://github.com/osmandapp/Osmand.git GIT_ORIGIN_NAME=origin #rm -rf "${GIT_DIR}" # initialize git if it is not present (clone it) if [ ! -d "$GIT_DIR" ]; then git clone ${GIT_URL} "${GIT_DIR}" fi # update git cd "${GIT_DIR}" gi...
Shell
#!/bin/sh DIRECTORY=$(cd `dirname $0` && pwd) GIT_DIR="$DIRECTORY"/osmand-git GIT_ORIGIN_NAME=origin BUILD_DIR="$DIRECTORY"/builds LATESTS_DIR="$DIRECTORY"/latests VERSION_FILE=./DataExtractionOSM/src/net/osmand/Version.java DATE=$(date +%d-%m-%y) SHORT_DATE=$(date +%d-%m) # clean all files in build directory rm -r ...
Shell
#!/bin/sh DIRECTORY=$(cd `dirname $0` && pwd) ## VARIABLES ### LOG_DIR="$DIRECTORY"/logs DATE=$(date +%d-%m-%y) LOG_FILE="$LOG_DIR/${DATE}.log" mkdir $LOG_DIR touch $LOG_FILE # 1. Update git directory "${DIRECTORY}/update_git.sh" 2>&1 >>$LOG_FILE # 2. Go through branches and generates builds "${DIRECTORY}/build_b...
Shell
#!/bin/sh DIRECTORY=$(cd `dirname $0` && pwd) GIT_DIR="$DIRECTORY"/osmand-git GIT_URL=git://github.com/osmandapp/Osmand.git GIT_ORIGIN_NAME=origin HG_DIR="$DIRECTORY"/osmand-hg HG_URL=https://osmand.googlecode.com/hg BUILD_DIR="$DIRECTORY"/builds if [ ! -d "$HG_DIR" ]; then hg clone ${GIT_URL} "${HG_DIR}" fi cd "...
Shell
#!/bin/sh DIRECTORY=$(cd `dirname $0` && pwd) FTP_SITE=download.osmand.net FTP_FOLDER=night-builds FTP_LATEST=latest-night-build # FTP_USER in local.properties # FTP_PWD= in local.properties BUILD_DIR="$DIRECTORY"/builds LATEST_DIR="$DIRECTORY"/latests . "$DIRECTORY"/local.properties # 3. upload to ftp server lftp -c...
Shell
#!/bin/sh # This file will start the Osm Extraction UI with custom memory settings for # the JVM. With the below settings the heap size (Available memory for the application) # will range from 64 megabyte up to 512 megabyte. java -Djava.util.logging.config.file=logging.properties -Xms64M -Xmx512M -cp "./OsmAndMapCrea...
Shell
# This file will start the Osm Extraction UI with custom memory settings for # the JVM. With the below settings the heap size (Available memory for the application) # will range from 64 megabyte up to 512 megabyte. java -Djava.util.logging.config.file=logging.properties -Xms64M -Xmx512M -cp "./OsmAndMapCreator.jar:./l...
Shell
#!/bin/sh # This file will start the Osm Extraction UI with custom memory settings for # the JVM. With the below settings the heap size (Available memory for the application) # will range from 64 megabyte up to 512 megabyte. java -Djava.util.logging.config.file=logging.properties -Xms64M -Xmx512M -cp "./OsmAndMapCrea...
Shell
#!/bin/bash # # Copyright (c) 2011 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. readonly SCRIPT_DIR="$(dirname "$0")" readonly SCRIPT_DIR_ABS="$(cd "${SCRIPT_DIR}" ; pwd -P)" export NACL_SDK_ROOT=C:\Wor...
Shell
ant clean; ant release; adb install -r bin/MetaTracker-release.apk
Shell
ant clean; ant release; adb install -r bin/MetaTracker-release.apk
Shell
ant clean; ant release; adb install -r bin/MetaTracker-release.apk
Shell
#!/bin/bash # 打开apache.http调试信息 adb shell setprop log.tag.org.apache.http VERBOSE adb shell setprop log.tag.org.apache.http.wire VERBOSE adb shell setprop log.tag.org.apache.http.headers VERBOSE echo "Enable Debug"
Shell
#!/bin/bash # # Copyright (c) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
Shell
#!/bin/sh -x PROJECT="gmail-delay-send" USER="blairkutz@gmail.com" ENV=dev FILE_NAME="output/${PROJECT}.${ENV}" echo "Combining and uploading files for $ENV" rm -f ${FILE_NAME} touch ${FILE_NAME} for FILE in ../src/* do cat $FILE >> ${FILE_NAME} done python utils/googlecode_upload.py -s "Uploading for $ENV" -p ...
Shell
#!/bin/sh VERSION=BETA_0.7.3 git tag -f ${VERSION} mkdir -f output FILE_NAME=output/${VERSION}.combined for FILE in ../src/downloaded/* do cat $FILE >> ${FILE_NAME} done
Shell
#!/bin/sh rm -rf extension.zip cd extension/ zip -qr ../extension.zip . cd .. zipinfo -l extension.zip
Shell
#!/bin/sh # # Usage example: ./generate.sh int Int Integer" # Args are: primitive type, capitalized primitive type, wrapper type # # To make changes to the .java files in this package, # 1. run this script to generate the templates, move the .gen files # somewhere else # 2. modify the template with your intended cha...
Shell
#!/bin/bash # # This script checks the java version and bails if it's less # than Java6 (because we use @Override annotations on interface # overriding methods. It then proceeds to do a maven build that # first cleans, then builds the normal lifecycle through compilation # unit testing (if available) up to packaging. ...
Shell
#!/bin/sh ruby webrick.rb
Shell
#!/bin/sh ruby webrick.rb
Shell
#!/bin/bash # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
Shell
#! /bin/bash d=no TMP=bak`date +%s` Ricorsivo () { if [ "$1" = "" ] ; then PWD=`pwd` else PWD=$1 fi cd $PWD find ./ -name "*~" -print > /tmp/$TMP 2> /dev/null find ./ -name ".*~" -print >> /tmp/$TMP 2> /dev/null FILES=`wc -l /tmp/$TMP | cut -d/ -f1 ` if [ ${FILES} -ge 1 ] ; then rm -f `cat /tmp/$TMP` echo $FILES ...
Shell
#! /bin/bash d=no TMP=bak`date +%s` Ricorsivo () { if [ "$1" = "" ] ; then PWD=`pwd` else PWD=$1 fi cd $PWD find ./ -name "*~" -print > /tmp/$TMP 2> /dev/null find ./ -name ".*~" -print >> /tmp/$TMP 2> /dev/null FILES=`wc -l /tmp/$TMP | cut -d/ -f1 ` if [ ${FILES} -ge 1 ] ; then rm -f `cat /tmp/$TMP` echo $FILES ...
Shell
#!/bin/sh # Uncompress all compressed mail in a maildir DEBUG="true" LOG="echo" for file in `/bin/ls|grep Z`; do uncompressed=`echo $file|sed -e "s/Z//"` if [ $file != $uncompressed ]; then ${DEBUG} "$file => $uncompressed" gunzip -dc $file > $uncompressed && \ touch -r $file $uncompre...
Shell
#!/bin/sh # Compress all "good" mails in a maildir DEBUG="true" LOG="echo" for file in `/bin/ls|grep 'S=[0-9]'|grep -v Z`; do compressed=`echo $file|sed -e "s/S\([a-zA-Y]*\)$/SZ\1/"` if [ $file != $compressed ]; then ${DEBUG} "$file => $compressed" gzip -9 -c $file > $compressed && \ t...
Shell
#!/bin/sh # Compress all "good" mails in a maildir DEBUG="true" LOG="echo" for file in `/bin/ls|grep 'S=[0-9]'|grep -v Z`; do compressed=`echo $file|sed -e "s/S\([a-zA-Y]*\)$/SZ\1/"` if [ $file != $compressed ]; then ${DEBUG} "$file => $compressed" gzip -9 -c $file > $compressed && \ t...
Shell
#!/bin/sh # Uncompress all compressed mail in a maildir DEBUG="true" LOG="echo" for file in `/bin/ls|grep Z`; do uncompressed=`echo $file|sed -e "s/Z//"` if [ $file != $uncompressed ]; then ${DEBUG} "$file => $uncompressed" gunzip -dc $file > $uncompressed && \ touch -r $file $uncompre...
Shell
#! /bin/bash #### BAK bash script #### Deletes backup files #### v4 05/2010 Simone Cingano # hflag=no # help nflag=no # nodelete - do not delete files rflag=no # recursion pflag=no # pyc - consider .pyc file vflag=no # list files (performs delete anyway) aflag=no # all - flags r + p + m mflag=no # vim - consider .swp...
Shell
#! /bin/sh ### BEGIN INIT INFO # Provides: skeleton # Required-Start: $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Example initscript # Description: This file should be used to construct scripts to be # place...
Shell
#! /bin/sh ### BEGIN INIT INFO # Provides: skeleton # Required-Start: $remote_fs # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Example initscript # Description: This file should be used to construct scripts to be # place...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # First version: 2010-11-09T11:10 CET (+0100) # Last modified: 2010-12-27T10:24 CET (+0100) # # Synopsis: Clean SCAN folder # # $Id$ DEBUG="echo" SCAN="/Docs/SCAN" cd $SCAN for user in *; do echo Processing $user cd $user cat<...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx>. # First version: 02:lug:2008 17:24 # # Synopsis: Sync imap servers # # $Id$ LOGFILE="/var/log/archiveMail.log" SERVER="zeus.oob" USER1="__public__" USER2="__archive__" AUTHUSER="dm" PASS="xxxxx" if [ "$1" == "-h" ]; then cat<<EOB `b...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # First version: 2010-10-29T10:54 CEST (+0200) # # Synopsis: Clean Up old and useless mail messages # # $Id$ RC="/usr/local/etc/mailClean.rc" echo echo "Reading configuration from '$RC'" echo egrep -v "^;|^//|^\s*$" ${RC}| while IFS=":" re...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # First version: 2010-10-29T10:54 CEST (+0200) # # Synopsis: Clean Up old and useless mail messages # # $Id: mailClean 96 2010-10-29 10:34:13Z root $ RC="/usr/local/etc/mailClean.rc" echo echo "Reading configuration from '$RC'" echo egrep ...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # # Synopsis: Mail Cleaning rules # # $Id$ LIB="/usr/local/lib/mailClean" RUNPARTS="/bin/run-parts" $RUNPARTS $LIB
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # # Synopsis: Mail Cleaning rules # # $Id: mailClean 96 2010-10-29 10:34:13Z root $ LIB="/usr/local/lib/mailClean" RUNPARTS="/bin/run-parts" $RUNPARTS $LIB
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # # Synopsis: Delete old EasyLink messages # # $Id$ # DEBUG="echo" MAILC=/var/mail/cubeholding.com DIR=$MAILC/__public__/maildir/ops/EasyLink/cur for file in `find $MAILC/__public__/maildir/ops/EasyLink/cur/ -type f -ctime +7 -exec grep -l...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # # Synopsis: Delete old EasyLink messages # # $Id$ # DEBUG="echo" DIR="$MAILC/__public__/maildir/sys/bacula/cur" find $DIR -type f -ctime 7 -exec rm {} \;
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # # Synopsis: Delete old EasyLink messages # # $Id$ # DEBUG="echo" DIR="$MAILC/__public__/maildir/sys/cron/cur" find $DIR -type f -ctime 7 -exec rm {} \;
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # # Synopsis: Delete old EasyLink messages # # $Id: Bacula 91 2010-06-15 13:43:26Z root $ # DEBUG="echo" DIR="$MAILC/__public__/maildir/sys/bacula/cur" find $DIR -type f -ctime 7 -exec rm {} \;
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # # Synopsis: Delete old EasyLink messages # # $Id: EasyLink 93 2010-06-16 09:29:13Z root $ # DEBUG="echo" MAILC=/var/mail/cubeholding.com DIR=$MAILC/__public__/maildir/ops/EasyLink/cur for file in `find $MAILC/__public__/maildir/ops/EasyL...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # # Synopsis: Delete old EasyLink messages # # $Id: Cron 91 2010-06-15 13:43:26Z root $ # DEBUG="echo" DIR="$MAILC/__public__/maildir/sys/cron/cur" find $DIR -type f -ctime 7 -exec rm {} \;
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # First version: 2010-11-09T11:10 CET (+0100) # Last modified: 2010-12-27T10:24 CET (+0100) # # Synopsis: Clean SCAN folder # # $Id: scanClean.sh 106 2010-12-27 09:25:27Z root $ DEBUG="echo" SCAN="/Docs/SCAN" cd $SCAN for user in *; do ...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx>. # First version: 02:lug:2008 17:24 # # Synopsis: Sync imap servers # # $Id: archiveMail.sh 533 2014-03-08 17:24:54Z AkelGE@gmail.com $ LOGFILE="/var/log/archiveMail.log" SERVER="zeus.oob" USER1="__public__" USER2="__archive__" AUTHUSER="d...
Shell
#!/bin/sh # Copyright (c)2008 CUBE S.p.A. # # Author: Andrea Mistrali <andre@cubeholding.com> # Description: Fix permissions on a SVN repository # # $Id: fixRepoPerms.sh 12 2008-10-10 09:13:21Z andre $ chgrp -R netusers * find . -type d -exec chmod g+rwxs {} \; find . -type f -exec chmod g+rw {} \;
Shell
#!/bin/sh # Copyright (c)2008 CUBE S.p.A. # # Author: Andrea Mistrali <andre@cubeholding.com> # Description: Create a new svn repository, fix permissions and create standard structure # # $Id$ if [ $# -lt 1 ]; then echo Syntax: `basename $0` "<repositoryName>" exit 2 fi mkdir $1 svnadmin create $1 chgrp ...
Shell
#!/bin/sh # Copyright (c)2008 CUBE S.p.A. # # Author: Andrea Mistrali <andre@cubeholding.com> # Description: Fix permissions on a SVN repository # # $Id$ chgrp -R netusers * find . -type d -exec chmod g+rwxs {} \; find . -type f -exec chmod g+rw {} \;
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright (c)2008 CUBE S.p.A. # # Author: Andrea Mistrali <andre@cubeholding.com> # Description: Auto Commit # # $Id$ function autoAddDel { svn status 2>/dev/null| grep '^?' | sed -e 's/^? /svn add "/g' -e 's/$/"/g' svn status 2>/dev/null| grep '^!' | sed -e ...
Shell
#!/bin/sh # Copyright (c)2008 CUBE S.p.A. # # Author: Andrea Mistrali <andre@cubeholding.com> # Description: Create a new svn repository, fix permissions and create standard structure # # $Id: addRepo.sh 12 2008-10-10 09:13:21Z andre $ if [ $# -lt 1 ]; then echo Syntax: `basename $0` "<repositoryName>" ex...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright (c)2008 CUBE S.p.A. # # Author: Andrea Mistrali <andre@cubeholding.com> # Description: Auto Commit # # $Id: autoCommit.sh 20 2009-04-29 07:30:20Z andre $ function autoAddDel { svn status 2>/dev/null| grep '^?' | sed -e 's/^? /svn add "/g' -e 's/$/"/g' ...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # First version: 2010-03-18T13:54 CET (+0100) # # Synopsis: Install CFG on PBX # # $Id$ scp -P 222 generateConfigResults/cfg* root@pbx.voip:/tftpboot/
Shell
#!/bin/bash JAVA_HOME=/usr GAPSLITE_HOME=. # Do NOT modify below this line LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:$GAPSLITE_HOME/lib/`uname -m` export LD_LIBRARY_PATH $JAVA_HOME/bin/java -classpath $GAPSLITE_HOME/lib/gapslite.jar:$GAPSLITE_HOME/lib/bcprov-jdk14-124.jar:$GAPSLITE_HOME/config com.grandstream....
Shell
#!/bin/bash JAVA_HOME=/usr GAPSLITE_HOME=. # Do NOT modify below this line LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:$GAPSLITE_HOME/lib/`uname -m` export LD_LIBRARY_PATH $JAVA_HOME/bin/java -classpath $GAPSLITE_HOME/lib/gapslite.jar:$GAPSLITE_HOME/lib/bcprov-jdk14-124.jar:$GAPSLITE_HOME/config com.grandstream....
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # First version: 2010-03-18T13:54 CET (+0100) # # Synopsis: Install CFG on PBX # # $Id$ scp -P 222 generateConfigResults/cfg* root@pbx.voip:/tftpboot/
Shell
# MYSQL function mysqlSetCommands { MYSQLCMD="mysql -h ${dbhost} -u ${user} -p${password}" # To be changed MYSQLDUMPCMD="mysqldump -cfxqR -h ${dbhost} -u ${user} -p${password}" } function mysqlDBList { echo "show databases" | $MYSQLCMD | egrep -v "Database|information_schema"|xargs } function mysqlFull { for db in `m...
Shell
# MYSQL function mysqlSetCommands { MYSQLCMD="mysql -h ${dbhost} -u ${user} -p${password}" # To be changed MYSQLDUMPCMD="mysqldump -cfxqR -h ${dbhost} -u ${user} -p${password}" } function mysqlDBList { echo "show databases" | $MYSQLCMD | egrep -v "Database|information_schema"|xargs } function mysqlFull { for db in `m...
Shell
# PostgresSQL function pgsqlSetCommands { PGOPT="-h ${dbhost} -U ${user}" PGCMD="psql ${PGOPT}" # To be changed PGDUMP="pg_dump ${PGOPT} --format=c" PGDUMPALL="pg_dumpall ${PGOPT} -g" PGPASSWORD=${password} export PGPASSWORD } function pgsqlDBList { echo "select datname from pg_database where not datname in ('bacula',...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # First version: 2010-10-26T08:48 CEST (+0200) # # Synopsis: Dump DBS - Supports Mysql and PGsql # # $Id$ # Args are: # $1 - host # $2 - type (mysql|pgsql) # $3 - level, defaults to Full # Parse args dbhost=$1 dbtype=${2:-NONE} level=${3:-...
Shell
#!/bin/sh # -*- coding: latin-1 -*- # Copyright by Andrea Mistrali <am@am.cx> # First version: 2010-10-26T08:48 CEST (+0200) # # Synopsis: Dump DBS - Supports Mysql and PGsql # # $Id: dumpDBS 533 2014-03-08 17:24:54Z AkelGE@gmail.com $ # Args are: # $1 - host # $2 - type (mysql|pgsql) # $3 - level, defaults to Full ...
Shell
# PostgresSQL function pgsqlSetCommands { PGOPT="-h ${dbhost} -U ${user}" PGCMD="psql ${PGOPT}" # To be changed PGDUMP="pg_dump ${PGOPT} --format=c" PGDUMPALL="pg_dumpall ${PGOPT} -g" PGPASSWORD=${password} export PGPASSWORD } function pgsqlDBList { echo "select datname from pg_database where not datname in ('bacula',...
Shell
#! /bin/bash #### BAK bash script #### Deletes backup files #### v4 05/2010 Simone Cingano # hflag=no # help nflag=no # nodelete - do not delete files rflag=no # recursion pflag=no # pyc - consider .pyc file vflag=no # list files (performs delete anyway) aflag=no # all - flags r + p + m mflag=no # vim - consider .swp...
Shell
svn2cl -a -i --break-before-msg --group-by-day --separate-daylogs
Shell
#!/bin/sh # -*- coding: utf-8 -*- # Copyright by @@LONGNAME@@ <@@EMAIL@@> # First version: @@crdate@@ # # Synopsis: @@DESCR@@ # # $Id$ # vim: set ts=4 sw=4 tw=79 ft=sh :
Shell
#!/bin/sh # -*- coding: utf-8 -*- # Copyright by @@LONGNAME@@ <@@EMAIL@@> # First version: @@crdate@@ # # Synopsis: @@DESCR@@ # # $Id$ # vim: set ts=4 sw=4 tw=79 ft=sh :
Shell
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim vim +PluginInstall +qall
Shell
# /etc/zshrc: system-wide .zshrc file for zsh(1). # # This file is sourced only for interactive shells. It # should contain commands to set up aliases, functions, # options, key bindings, etc. # # Global Order: zshenv, zprofile, zshrc, zlogin # # Determine zsh conf file position. On Debian/Ubuntu is /etc/zsh, on other...
Shell
####################################################################################### # Start autocomplete autoload -U compinit; compinit -u autoload -U compsys; compctl -g "*(-/)" + -g ".*(-/)" cd # allow approximate zstyle ':completion:*' completer _complete _match _approximate zstyle ':completion:*:match:*' origi...
Shell
####################################################################################### # Setup LESS ## make less colourful LESS_TERMCAP_mb=$'\E[01;34m' # begin blinking LESS_TERMCAP_md=$'\E[01;36m' # begin bold LESS_TERMCAP_me=$'\E[0m' # end mode LESS_TERMCAP_so=$'\E[01;47;34m' # begin standout-mode ...
Shell
####################################################################################### # Aliases alias ls='ls -F --color' alias dir='ls -l' alias la='ls -A' alias ll='ls -l' alias lla='ls -Al' alias killall='killall -v' alias cls='clear' alias dc=cd alias les=less alias fu='sudo $(fc -ln -1)' alias sudo='sudo ' al...
Shell
fpath=($0:h/prompts $fpath) autoload -U promptinit;promptinit # vim: set ts=4 sw=4 tw=0 ft=zsh :
Shell
function venv { # export WORKON_HOME=$HOME/Src/virtualenvs # export PROJECT_HOME=$HOME/Src/projects if [ -z $WORKON_HOME ] || [ -z $PROJECT_HOME ]; then echo "Please, set WORKON_HOME and PROJECT_HOME first." echo "Better place to set them is 99-local.zsh" return fi VIRTUALE...
Shell
# setopt ALL_EXPORT setopt ALWAYS_TO_END setopt APPEND_HISTORY setopt AUTONAMEDIRS setopt AUTO_PARAM_SLASH setopt AUTO_REMOVE_SLASH setopt AUTO_RESUME setopt CDABLE_VARS setopt CORRECT setopt FUNCTION_ARGZERO setopt HIST_IGNORE_ALL_DUPS setopt HIST_NO_STORE setopt HIST_REDUCE_BLANKS setopt LIST_TYPES setopt LONG_LIST_...
Shell
####################################################################################### # Variables ## Vars used always PATH="/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/sbin:/sbin:$HOME/bin:." # LANG="it_IT.UTF-8" # TZ='Europe/Rome' MIBS=all LOGD=/var/log ## If we are not interactive quit [ -z "...
Shell
####################################################################################### # Functions # cdb - Goes to folder by complete path autoload -U cdb # hist - Grep from history autoload -U hist # hdu - Human readable report of files and directories sizes autoload -U hdu # dust - list total size in . directory...
Shell
####################################################################################### # # Backward-kill-word stop on dir delimiter autoload -U select-word-style select-word-style bash # Standard Linux bindkey "^[[1;5C" forward-word bindkey "^[[1;5D" backward-word # Useful under iTerm bindkey "-e" bindkey "\eOH" ...
Shell
####################################################################################### # Colorize terminal autoload colors zsh/terminfo zmodload zsh/terminfo if [[ "$terminfo[colors]" -ge 8 ]]; then colors fi # for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do # eval PR_$color='%{$terminfo[bold]$fg[${...
Shell
####################################################################################### # Start autocomplete autoload -U compinit; compinit -u autoload -U compsys; compctl -g "*(-/)" + -g ".*(-/)" cd # allow approximate zstyle ':completion:*' completer _complete _match _approximate zstyle ':completion:*:match:*' origi...
Shell
####################################################################################### # Setup LESS ## make less colourful LESS_TERMCAP_mb=$'\E[01;34m' # begin blinking LESS_TERMCAP_md=$'\E[01;36m' # begin bold LESS_TERMCAP_me=$'\E[0m' # end mode LESS_TERMCAP_so=$'\E[01;47;34m' # begin standout-mode ...
Shell
function venv { # export WORKON_HOME=$HOME/Src/virtualenvs # export PROJECT_HOME=$HOME/Src/projects if [ -z $WORKON_HOME ] || [ -z $PROJECT_HOME ]; then echo "Please, set WORKON_HOME and PROJECT_HOME first." echo "Better place to set them is 99-local.zsh" return fi VIRTUALE...
Shell
####################################################################################### # Aliases alias ls='ls -F --color' alias dir='ls -l' alias la='ls -A' alias ll='ls -l' alias lla='ls -Al' alias killall='killall -v' alias cls='clear' alias dc=cd alias les=less alias fu='sudo $(fc -ln -1)' alias sudo='sudo ' al...
Shell
# Linux if which dircolors > /dev/null; then if [ -f /etc/dir_colors ]; then eval `dircolors /etc/dir_colors` else eval `dircolors` fi fi alias ls='LANG=C ls -F --color=auto --group-directories-first' alias open='xdg-open ' # vim: set ts=4 sw=4 tw=0 ft=zsh :
Shell
LESSPIPE=`whence -p lesspipe || whence -p lesspipe.sh` eval `$LESSPIPE`
Shell
# Linux if which dircolors > /dev/null; then if [ -f /etc/dir_colors ]; then eval `dircolors /etc/dir_colors` else eval `dircolors` fi fi alias ls='LANG=C ls -F --color=auto --group-directories-first' alias open='xdg-open ' # vim: set ts=4 sw=4 tw=0 ft=zsh :
Shell
# setopt ALL_EXPORT setopt ALWAYS_TO_END setopt APPEND_HISTORY setopt AUTONAMEDIRS setopt AUTO_PARAM_SLASH setopt AUTO_REMOVE_SLASH setopt AUTO_RESUME setopt CDABLE_VARS setopt CORRECT setopt FUNCTION_ARGZERO setopt HIST_IGNORE_ALL_DUPS setopt HIST_NO_STORE setopt HIST_REDUCE_BLANKS setopt LIST_TYPES setopt LONG_LIST_...
Shell
####################################################################################### # # Backward-kill-word stop on dir delimiter autoload -U select-word-style select-word-style bash # Standard Linux bindkey "^[[1;5C" forward-word bindkey "^[[1;5D" backward-word # Useful under iTerm bindkey "-e" bindkey "\eOH" ...
Shell
function prompt_server_setup { # Setup PROMPT if `fancyTerm`; then # We are on xterminal W="%n@%m:%." I="%m:%." L="%B@%m %~ %#%b " PS1="%{]2;$W%}%{]1;$I%}$L" unset W I L else # We are not on xterminal PS1="%B%n@%m:%~ %#%b " fi } prompt_server_setup # vim: set ts=4 sw=4 tw=0 ft=z...
Shell