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 | |
usage() | |
{ | |
echo "Usage: $0 [ASN]" | |
} | |
if [ $# -ne 1 ]; then | |
usage | |
exit 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
#!/bin/bash | |
SIZE=400 | |
cat >index.html<<EOF | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Thumbnail gallery</title> |
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 os, sys, re, time | |
from shutil import copyfileobj | |
from urllib.request import urlopen, unquote | |
from xml.etree import ElementTree as ET | |
from socket import error as socket_error | |
import socket | |
import requests |
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/python3.6 | |
import pathlib | |
import shutil | |
import os | |
def filesize(path): | |
return path.stat().st_size | |
def biggest(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 | |
UNIFI_DOMAIN="unifi.example.com" | |
WEECHAT_DOMAIN="weechat.example.com" | |
WEECHAT_USER="username" | |
DOMAIN_LIST="$UNIFI_DOMAIN $WEECHAT_DOMAIN www.example.com" | |
######################################################################## | |
# | |
# Program header |
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
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
#!/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
#!/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 | |
SAVEIFS=${IFS} | |
IFS=$(echo -en "\n\b") | |
THUMBNAIL_DIR=".thumbnails2" | |
THUMBNAIL_SIZE=170 | |
THUMBNAIL_PREFIX="thumbnail-" | |
override=0 |