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/perl -w | |
######################################################################################## | |
# This script connects to a domain controller and produces an organizational chart. | |
# | |
# It is based on the script at the following page:- | |
# http://thelowedown.wordpress.com/2008/05/27/generate-calltree-from-active-directory/ | |
# | |
# Chris Hills ([email protected]) | |
# 2012/10/19 |
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
On Error Resume Next | |
Const ADS_SCOPE_SUBTREE = 2 | |
Dim strTimestamp | |
strTimestamp = "20120901000000.0Z" | |
set objRootDSE = GetObject("LDAP://RootDSE") | |
RootDN = objRootDSE.Get("defaultNamingContext")) | |
Set objConnection = CreateObject("ADODB.Connection") |
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 python | |
import errno | |
import os | |
import sys | |
import subprocess | |
#----------------------------------------------------------------------------- | |
def main(): | |
fileNames = sys.argv[1:] |
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/python | |
import os, sys | |
import urlparse | |
from shutil import copyfileobj | |
from urllib import urlopen, unquote | |
from xml.etree import ElementTree as ET | |
from socket import error as socket_error | |
import socket |
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 | |
SAVEIFS=${IFS} | |
IFS=$(echo -en "\n\b") | |
THUMBNAIL_DIR=".thumbnails2" | |
THUMBNAIL_SIZE=170 | |
THUMBNAIL_PREFIX="thumbnail-" | |
override=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/bash | |
/usr/bin/certbot renew | |
if test $(find /etc/letsencrypt/live/unifi.example.com/cert.pem -mmin -60) | |
then | |
/bin/systemctl stop unifi.service | |
/usr/bin/openssl pkcs12 -export -inkey /etc/letsencrypt/live/unifi.example.com/privkey.pem -in /etc/letsencrypt/live/unifi.example.com/fullchain.pem -out /tmp/unifi.example.com.p12 -name ubnt -password pass:temppass | |
/bin/keytool -importkeystore -deststorepass aircontrolenterprise -destkeypass aircontrolenterprise -destkeystore /opt/UniFi/data/keystore -srckeystore /tmp/unifi.example.com.p12 -srcstoretype PKCS12 -srcstorepass temppass -alias ubnt -noprompt | |
/bin/rm -f /tmp/unifi.example.com.p12 |
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 | |
/usr/bin/certbot renew | |
if /usr/bin/test $(find /etc/letsencrypt/live/weechat.example.com/cert.pem -mmin -60) | |
then | |
/bin/cat /etc/letsencrypt/live/weechat.example.com/cert.pem /etc/letsencrypt/live/weechat.example.com/privkey.pem > /home/user/.weechat/ssl/weechat.example.com_ssl.pem | |
/bin/cat /etc/letsencrypt/live/weechat.example.com/fullchain.pem > /home/user/.weechat/ssl/weechat.example.com_fullchain.pem | |
/usr/bin/su -c 'echo "*/relay sslcertkey" > /home/user/.weechat/weechat_fifo_*' user | |
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
Notice: Undefined index: access_token in /var/www/production/public/app/code/local/Wcm/Iqcloud/Helper/Api.php on line 72 | |
#0 /var/www/production/public/app/code/local/Wcm/Iqcloud/Helper/Api.php(72): mageCoreErrorHandler(8, 'Undefined index...', '/var/www/produc...', 72, Array) | |
#1 /var/www/production/public/app/code/local/Wcm/Iqcloud/Helper/Api.php(353): Wcm_Iqcloud_Helper_Api->getAccessToken() | |
#2 /var/www/production/public/app/code/local/Wcm/Iqcloud/Model/Observer.php(182): Wcm_Iqcloud_Helper_Api->api_update_customer(Object(Varien_Object)) | |
#3 /var/www/production/public/app/code/core/Mage/Core/Model/App.php(1358): Wcm_Iqcloud_Model_Observer->afterCustomerSave(Object(Varien_Event_Observer)) | |
#4 /var/www/production/public/app/code/core/Mage/Core/Model/App.php(1337): Mage_Core_Model_App->_callObserverMethod(Object(Wcm_Iqcloud_Model_Observer), 'afterCustomerSa...', Object(Varien_Event_Observer)) | |
#5 /var/www/production/public/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('customer_save_a...', Array) | |
#6 /var |
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
$ FILE=/some/path/to/file.txt | |
################################### | |
### Remove matching suffix pattern | |
################################### | |
$ echo ${FILE%.*} # remove ext | |
/some/path/to/file | |
$ FILE=/some/path/to/file.txt.jpg.gpg # note various file exts |
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 | |
UNIFI_DOMAIN="unifi.example.com" | |
WEECHAT_DOMAIN="weechat.example.com" | |
WEECHAT_USER="username" | |
DOMAIN_LIST="$UNIFI_DOMAIN $WEECHAT_DOMAIN www.example.com" | |
######################################################################## | |
# | |
# Program header |
OlderNewer