Skip to content

Instantly share code, notes, and snippets.

View mstyne's full-sized avatar
🐍
Improving my Python skills

Michael Styne mstyne

🐍
Improving my Python skills
View GitHub Profile
@mstyne
mstyne / gist:89e8d8e663b0bddbf432da4b6e282d58
Last active June 28, 2024 14:44
Encrypt a file / pipe using OpenSSL
Encrypt:
openssl aes-256-cbc -a -salt -in secrets.txt -out secrets.txt.enc
command | openssl aes-256-cbc -a -salt > secrets.txt.enc
php ex.php ubersmith | openssl aes-256-cbc -md sha512 -pbkdf2 -iter 1000000 -salt > data.csv.enc
Decrypt:
openssl aes-256-cbc -md sha512 -pbkdf2 -iter 1000000 -salt -d -in data.csv.enc -out data.csv
-A O365_INPUT -s 13.93.164.45/32 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
-A O365_INPUT -s 104.42.230.91/32 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
-A O365_INPUT -s 13.71.145.114/32 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
-A O365_INPUT -s 13.78.120.70/32 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
-A O365_INPUT -s 13.78.120.69/32 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
-A O365_INPUT -s 13.78.120.99/32 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
-A O365_INPUT -s 13.84.222.249/32 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
-A O365_INPUT -s 13.91.98.185/32 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
-A O365_INPUT -s 13.92.181.66/32 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
-A O365_INPUT -s 13.107.6.156/31 -p tcp -m tcp --dport 25 -m state --state NEW -j ACCEPT
/**
* @param string $url
*/
protected static function getFileSystem( $url = '' ) {
if ( empty( $url ) ) {
$url = wp_nonce_url( 'admin.php?page=vc-general', 'wpb_js_settings_save_action' );
}
if ( false === ( $creds = request_filesystem_credentials( $url, '', false, false, null ) ) ) {
_e( 'This is required to enable file writing for js_composer', 'js_composer' );
exit(); // stop processing here
@mstyne
mstyne / galera.txt
Created November 12, 2015 14:54
TREASURE TROVE
http://galeracluster.com/documentation-webpages/ssl.html
http://galeracluster.com/documentation-webpages/
https://www.percona.com/blog/2013/05/02/galera-flow-control-in-percona-xtradb-cluster-for-mysql/
http://galeracluster.com/documentation-webpages/arbitrator.html
http://www.percona.com/blog/2014/09/01/galera-replication-how-to-recover-a-pxc-cluster/
https://www.percona.com/forums/questions-discussions/percona-xtradb-cluster/13702-galera-cluster-latency-issues
http://mysql.rjweb.org/doc.php/galera
https://www.percona.com/blog/2015/06/12/percona-xtradb-cluster-quorum-availability-cluster/
https://www.percona.com/blog/2013/05/03/percona-xtradb-cluster-for-mysql-and-encrypted-galera-replication/
31 joejob = account1.INBOX:is_unseen() *
32 account1.INBOX:contain_from('Mail Delivery') +
33 account1.INBOX:contain_from('postmaster') +
34 account1.INBOX:contain_subject('Undelivered Mail')
35
36 joejob:delete_messages()
[email protected] (freenode)
0330 -!- Irssi: Starting query in freenode with Yo_LtA
0330 <Yo_LtA> Hello. i'm eRic M France. I'm there to share information
concerning theories about our origins. Monotheism & Evolution's
theory are based on beliefs 'cause nothing in science can
establish that these théories are correct
0330 <Yo_LtA> However, the new one considering that we have been created by
human beings of a most advanced civilisation mastering
biotechnologies (intelligent Design) is enlightened with real
facts. Wanna read about it ?
1141 -!- Irssi: Starting query in xmpp:[email protected] with
[email protected]/IOSa21a122c
1141 -!- [email protected]: Also known as Matt Toback
1141 <[email protected]/IOSa21a122c> Hi
1141 <[email protected]> toot
1142 <[email protected]/IOSa21a122c> Hello my good man.
1142 <[email protected]> WHO NEEDS DA WEB ANYWAY
@mstyne
mstyne / percona-xtradb-cluster.md
Created May 20, 2015 17:48
percona-xtradb-cluster.md

Ubersmith and Database Clustering

Overview

From Wikipedia:

High-availability clusters are groups of computers that support server applications that can be reliably utilized with a minimum of down-time. They operate by using high availability software to harness redundant computers in groups or clusters that provide continued service when system components fail.

While there are many MySQL-based clustering solutions available, Ubersmith presently supports and advocates the use of Percona XtraDB Cluster.

@mstyne
mstyne / support.ticket_submit_outgoing.php
Created May 14, 2015 13:13
support.ticket_submit_outgoing Example
<?php
require_once dirname(__FILE__) .'/class.uber_api_client.php';
$client = new uber_api_client('http://your.ubersmith.com/','api','password');
try {
$result = $client->call('support.ticket_submit_outgoing',array(
'client_id' => 1,
'body' => 'Test',
00:38:05$ fm WB3FKP-0 to ALL-0 via RS0ISS-0 UI PID=F0
=4110.64N/07601.26W-de WB3FKP @gmail.com Mark in Alden Station, PA FN11XE
00:38:11$ fm WB3FKP-0 to ALL-0 via RS0ISS-0 UI PID=F0
WB3FKP Mark in Alden Station, PA 50W and 5/8 GP ant
00:38:15$ fm WB3FKP-0 to ALL-0 via RS0ISS-0 UI PID=F0
=4110.64N/07601.26W-de WB3FKP @gmail.com Mark in Alden Station, PA FN11XE
00:38:18$ fm WB3FKP-0 to ALL-0 via RS0ISS-0 UI PID=F0
=4110.64N/07601.26W-de WB3FKP @gmail.com Mark in Alden Station, PA FN11XE
00:38:19$ fm WB3FKP-0 to ALL-0 via RS0ISS-0 UI PID=F0
=4110.64N/07601.26W-de WB3FKP @gmail.com Mark in Alden Station, PA FN11XE