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 | |
USERNAME={RackspaceUsername} | |
APIKEY={RackspaceApikey} | |
ACCOUNT={RackspaceAccount} | |
LBID={LoadBalancerID} | |
JSON=$(curl -vs \ | |
-X POST 'https://identity.api.rackspacecloud.com/v2.0/tokens' \ | |
-d '{ "auth": { "RAX-KSKEY:apiKeyCredentials": { "username": "'$USERNAME'", "apiKey": "'$APIKEY'" } } }' \ |
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 | |
TODATE=`date +'%F'` | |
cat /var/log/exim_mainlog | \ | |
grep $TODATE | \ | |
grep 'SMTP connection from' | \ | |
grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}' > /tmp/iplist.tmp | |
sort /tmp/iplist.tmp | uniq > /tmp/iplist.tmp2 |
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 | |
APP=`hostname` | |
APIKEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | |
VAR=`pidof inotifywait | wc -w` | |
if [[ $VAR -eq 1 ]] ; then | |
exit; | |
fi |
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
BASEPATH=/var/www/vhosts | |
LIST=`ls $BASEPATH -1` | |
for i in $LIST | |
do | |
FOLDER=$BASEPATH/$i/public_html/wp-content/uploads | |
RESULT=`find $FOLDER -type f -exec identify {} 2>&1 \; | grep -v 'JPEG' | grep -v 'PNG' | grep -v 'BMP' | grep -v 'PDF' | grep -v 'GIF'` |
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 | |
LOCKFILE=/tmp/notify.pid | |
HSTFILE=/tmp/history.tmp | |
if [ -e ${LOCKFILE} ] && kill -0 `cat ${LOCKFILE}`; then | |
echo "already running" | |
exit | |
fi |
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
<?php | |
# composer install gentle/bitbucket-api | |
require dirname(__FILE__) . "/vendor/autoload.php"; | |
$bb_user = 'BITBUCKET_USER'; | |
$bb_pass = 'BITBUCKET_PASS'; | |
$account_name = 'BITBUCKET_ACCOUNT'; |
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
This is a workaround to fix the error for backup-manager | |
can't locate object method "add_key_filename" via package "0" | |
This error is raised bec no propper Net::Amazon::S3 initialization. | |
To solve this you must enter the host parameter to where the API will authenticate: | |
/usr/bin/backup-manager-upload on line 870 you need to change: | |
This: |
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
FROM php:7.4-alpine | |
ARG GLIB_VERSION="2.31-r0" | |
# Install language pack | |
RUN apk --no-cache add ca-certificates wget && \ | |
wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \ | |
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIB_VERSION}/glibc-${GLIB_VERSION}.apk && \ | |
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIB_VERSION}/glibc-bin-${GLIB_VERSION}.apk && \ | |
wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIB_VERSION}/glibc-i18n-${GLIB_VERSION}.apk && \ |
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
# Install Azure CLI if not already installed | |
$azCliInstalled = Get-Command az -ErrorAction SilentlyContinue | |
if (-not $azCliInstalled) { | |
Write-Host "Azure CLI is not installed. Please install Azure CLI before running this script." | |
exit | |
} | |
# Set Azure DevOps organization URL and project name | |
$orgUrl = "https://dev.azure.com/YourOrganizationName" |
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
#!/usr/bin/env bash | |
function valid_format { | |
local email=$1 | |
local regex="^(([A-Za-z0-9]+((\.|\-|\_|\+)?[A-Za-z0-9]?)*[A-Za-z0-9]+)|[A-Za-z0-9]+)@(([A-Za-z0-9]+)+((\.|\-|\_)?([A-Za-z0-9]+)+)*)+\.([A-Za-z]{2,})+$" | |
[[ $email =~ ${regex} ]] || return 1 | |
} |
OlderNewer