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/bash | |
if [ $# -lt 1 ] | |
then | |
echo "Nicht genügend Argumente!" | |
echo "Benutzung: $0 file [file2 [...]]" | |
exit 1 | |
else | |
while [ $# -gt 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 | |
FOLDER=/opt/debs | |
LOGS=$FOLDER/logs | |
if [ ! -d $FOLDER ]; then | |
mkdir $FOLDER | |
if [ ! -d $FOLDER ]; then | |
sudo mkdir $FOLDER | |
sudo chown $USER:$USER $FOLDER |
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/bash | |
##host | |
githost="git@mitharas.de" | |
#---------- | |
# get list of repos using git gl-info from https://cnlpete@github.com/cnlpete/gitolite-tools.git | |
#install git ls-info | |
curdir=`pwd` | |
cd /tmp | |
#git clone https://cnlpete@github.com/cnlpete/gitolite-tools.git gitolite-tools |
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
5 */6 * * * /etc/init.d/minecraft backup #backup four times a day, meaning every 6 hours | |
15 */2 * * * /etc/init.d/minecraft map #generate map every two hours | |
10 1 * * * /etc/init.d/minecraft clean #clean old files daily |
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
# backup every hour, meaning 00:05, 01:05, 02:05, 03:05, 04:05, ... 23:05 | |
5 * * * * /etc/init.d/minetest backup | |
# clean old files (once a day, at 01:10 | |
10 1 * * * /etc/init.d/minetest clean |
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
require 'cgi' | |
require 'digest/md5' | |
require 'net/https' | |
require 'uri' | |
module Jekyll | |
class GistTag < Liquid::Tag | |
def initialize(tag_name, text, token) | |
super | |
@text = text |
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
# Copyright (C) 2011 Anurag Priyam - MIT License | |
module Jekyll | |
# Jekyll plugin to generate tag clouds. | |
# | |
# The plugin defines a `tag_cloud` tag that is rendered by Liquid into a tag | |
# cloud: | |
# | |
# <div class='cloud'> |
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
def screenshotFilter(poi): | |
'''This looks for signs that have their first line in the 'Image:<id>' format, where <id> is an | |
id from an Imgur.com image.''' | |
if poi['id'] == 'Sign': | |
if poi['Text1'].startswith('Image:'): | |
poi['icon'] = "painting_icon.png" | |
image_html = "<style>.infoWindow img[src='{icon}'] {{display: none}}</style><a href='http://imgur.com/{id}'><img src='http://imgur.com/{id}s.jpg' /></a>".format(icon=poi['icon'], id=poi['Text1'][6:]) | |
return "\n".join([image_html, poi['Text2'], poi['Text3'], poi['Text4']]) | |
def playerFilter(poi): |
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
#include "ProcessInfo.h" | |
#ifdef _WIN32 | |
#include "psapi.h" | |
#pragma comment(lib, "psapi.lib") | |
#include "tlhelp32.h" | |
#endif | |
#ifdef linux | |
#include <sys/sysinfo.h> |
OlderNewer