This file contains hidden or 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
| ''' | |
| this snippet is used to load a web2py with postgresql environment | |
| you must install web2py (so gluon.*) from pyeggs : "pip install web2py" | |
| it will read your db.py models from the same directory | |
| ''' | |
| # web2py env | |
| from gluon.shell import exec_environment | |
| import psycopg2 | |
| from gluon import DAL, Field | |
| from gluon.template import render |
This file contains hidden or 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 | |
| # Create an Index File like in old ftp servers | |
| # use it for your external hd's to share content | |
| # expl. Video or MP3 Collections | |
| cd . | |
| ls -lR -Ils-lR > ls-lR | |
| cp -a ls-lR.gz ls-lR.old.gz | |
| gzip -d ls-lR.old.gz |
This file contains hidden or 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 | |
| # create mpg video from jpegs | |
| # Resolution: FullHD (1080i) | |
| # Orientation: Portrait | |
| # | |
| # tested with Ubuntu 14.04 | |
| # dependencies: sudo apt-get install imagemagick avconv | |
| # (c) 2015 by Klaus Kappel <kkappel@novalisa.net> | |
| # use under conditions of the GPL2, see http://www.gnu.org |
This file contains hidden or 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/bash | |
| # odf2html.sh - export all odt od doc files to html by shellscript | |
| # Inspired by Marco Fioretti, | |
| # who wrote this Article in 2012: http://www.techrepublic.com/blog/linux-and-open-source/how-to-convert-doc-and-odf-files-to-clean-and-lean-html/ | |
| # Klaus Kappel | |
| CONFIG=tidy.conf | |
| # first clean the dir, if script runs in cron job | |
| # rm -rf $2 |
This file contains hidden or 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 | |
| # resize jpeg images in current folder with ImageMagick | |
| # | |
| # (c) 2014 by Klaus Kappel | |
| # directory where target files are located | |
| TARGET=mini | |
| # Size of target images: 1280x1024 or 1280 (x = horizontal size) | |
| SIZE=1280 | |
| # Type (suffix) of Source Images: JPG, png, tif, etc. |
This file contains hidden or 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/bash | |
| # Lokalisieren eines Juhiwue-Notebooks oder Desktops | |
| # | |
| # Usage: wget | |
| # Für UBUNTU 16.04 | |
| # (c) 2017 by Klaus Kappel <kkappel@yahoo.de> | |
| # Sind wir in Rehr? | |
| INTERN=1 |
This file contains hidden or 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
| def GetWeek(week_nr, year): | |
| ''' | |
| Get start datetime and end datetime of calender week. | |
| Beginning with Monday, ending with Sunday. | |
| Needed for SQL-Queries. | |
| ''' | |
| montag = str(week_nr) + "-" + str(year) + '-1' | |
| monday = datetime.strptime(montag, '%W-%Y-%w') | |
| sonntag = str(week_nr) + "-" + str(year) + '-0' |
This file contains hidden or 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
| #!/usr/bin/python | |
| # -*- coding:utf-8 -*- | |
| #### | |
| # | |
| # NAME: check_smartarray.py | |
| # | |
| # AUTHOR: Christophe Robert - christophe °dot° robert °at° cocoche °dot° fr | |
| # | |
| # DESC: Check Hpacucli results for RAID status on Linux - hpacucli command line tool |
This file contains hidden or 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
| # Prepare OpenWrt for local developement of binaries | |
| # for TP-Link WRT3600 | |
| # by Klaus Kappel <kkappel@yahoo.de> | |
| # ABSOLUTELY NO WARRANTY FOR ANY DAMAGE TO YOUR ROUTER | |
| sudo apt update | |
| sudo apt install build-essential subversion libncurses5-dev zlib1g-dev gawk gcc-multilib flex git-core gettext | |
| sudo apt install quilt lzop libssl-dev | |
| git clone git://git.openwrt.org/openwrt.git | |
| cd openwrt |
This file contains hidden or 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/bash | |
| # Migrate from OwnCloud to NextCloud | |
| # tested with: UBUNTU 16.04 | |
| # (c) 2017 by Klaus Kappel <kkappel@yahoo.de> | |
| # UBUNTU 16.04, UBUNTU 14.04: apt-get | |
| apt=apt | |
| sudo -s | |
| $apt remove owncloud-client |
OlderNewer