It's a simple file or directory rotation script. Just set up the 2 variables (OBJECT and ROTATE) and run the script.
OBJECT="backup.tar.bz2" ROTATE=7 bash manualrotate.sh
[ `id -u` -ne 0 ] && [ -z "$TMUX" ] && tmux new-session -AD -s $HOSTNAME && exit 0 |
#!/bin/sh | |
AGENT=/mnt/c/tools/weasel-pageant/weasel-pageant | |
PROFILE=~/.cache/.ssh-agent | |
mkdir -p "$(dirname "$PROFILE")" && touch $PROFILE | |
source $PROFILE &> /dev/null | |
if [ ! -e "$SSH_AUTH_SOCK" ] | |
then | |
$AGENT > $PROFILE |
WScript.CreateObject("WScript.Shell").Run "wsl ~ -d Ubuntu -e /bin/bash -c ""DISPLAY=:0 xrdb ~/.Xresources && DISPLAY=:0 xst""", 0, false |
#!/usr/bin/python3 | |
# Remember to install the pyBotTelegramAPI package (usually from pip) | |
# It should works with Python 3.4 and above | |
import telebot, socket, subprocess, sys | |
BOT_TOKEN='<YOUR BOT TOKEN>' | |
DESTINATION='<DESTINATION ID>' |
SVCNAME=sybase9-mydb | |
DBNAME=MYDB | |
DBPORT=2638 | |
DBPATH=/srv/db | |
INITCACHE=2G | |
LOWCACHE=8G | |
UPCACHE=16G |
<?php | |
// Arquivo 'inc/session.class.php' | |
// Edite a função 'haveRight' para que ela fique similar ao exemplo abaixo | |
static function haveRight($module, $right) { | |
global $DB; | |
//If GLPI is using the slave DB -> read only mode | |
if ($DB->isSlave() | |
&& ($right & (CREATE | UPDATE | DELETE | PURGE))) { |
from ldap3 import Connection, Server | |
import getpass | |
SERVER = '127.0.0.1' | |
SEARCH = 'cn=%s,cn=Users,dc=example,dc=com' % input('Username: ') | |
PASSWD = getpass.getpass() | |
with Connection(Server(SERVER, use_ssl=True), SEARCH, PASSWD, auto_bind=True) as conn: | |
print(conn) | |
conn.unbind() |
ln -s /dev/null /var/lib/lxc/mycontainer/rootfs/etc/systemd/system/console-getty.service |
using System; | |
public static class GuidUtils | |
{ | |
public static Guid FromInt64(params long[] f) | |
{ | |
byte[] result = new byte[16]; | |
BitConverter.GetBytes (f [0]).CopyTo (result, 0); | |
BitConverter.GetBytes (f [1]).CopyTo (result, 8); |