Skip to content

Instantly share code, notes, and snippets.

View jeansymolanza's full-sized avatar

Jeansy Molanza jeansymolanza

View GitHub Profile
The Global1 8.3.0 Upgrade: Transforming a 2-Year Timeline into 8 Months
In 2022, I led the Global1 8.3.0 upgrade, a mission-critical project for our Securities Lending platform processing millions of trades daily across 10,000+ counterparties. This platform serves as the backbone for Barclays' Prime Brokerage business, and historically, such upgrades took 18-24 months with a notorious reputation for causing production outages and significant business disruption. Senior management challenged us to compress this timeline dramatically while maintaining zero tolerance for business disruption.
The Challenge
The project's complexity stemmed from multiple dimensions. First, we had to reconcile Barclays' extensive custom code—developed over years to support client-specific prime brokerage requirements—with the vendor's new implementation. Second, we needed to coordinate across six distinct teams spanning three continents: our Build-The-Bank (BTB) team in London, our Run-The-Bank (RTB) support team in Glasgow, our QA
context 'when se_linux mount exists' do
before do
# Mock File.directory? with any_args as you have
allow(File).to receive(:directory?).with(any_args).and_return(true)
# Mock shell_out for the ls -Z command exactly as you have
allow_any_instance_of(Chef::Resource).to receive(:shell_out)
.with('ls -Z /mnt/tmpfs | grep tmp_t')
.and_return(double('shell_out', exitstatus: 1))
keytool -importkeystore -srckeystore your_keystore.jks -destkeystore keystore.p12 -srcstoretype JKS -deststoretype PKCS12 -srcalias your_alias -deststorepass your_password -srcstorepass your_password
openssl pkcs12 -in keystore.p12 -nocerts -nodes -out private_key.pem
openssl pkcs12 -in keystore.p12 -clcerts -nokeys -out certificate.pem
cat private_key.pem certificate.pem > combined.pem
LATEST_VERSION=$(find "$(readlink -f "$BASE_DIR")" -maxdepth 1 \( -type d -o -type l \) -exec stat --format '%Y %n' {} \; | sort -nr | head -n 1 | awk '{print $2}')
To determine the amount of NUSERS, follow these steps:
1. Average Connections per Device:
- If not using device licensing: 1
- If using device licensing: typically 2 or 3 (maximum 10).
2. Average Number of Phantoms:
- If using phantoms: provide a specific number.
- If not: suggested value is 20.
if [ $(pgrep -c 'GTF') -eq 6 ]; then echo 0; else echo 1; fi
#!/usr/bin/perl
use strict;
use warnings;
use MQClient::MQSeries;
sub printLog2 {
my ($message, $detail) = @_;
print "$message: $detail\n";
}
for dir in /path/to/directory/*; do [ -d "$dir" ] && echo "Folder: $dir" && echo "Size: $(du -sh "$dir" | awk '{print $1}')"; done
Converting a Key Database (KDB) to a Java KeyStore (JKS) involves several steps. Here's a simple and effective way to perform the conversion using OpenSSL and keytool. This method assumes that you have the necessary tools installed on your system:
1. **Export the Certificate and Key from KDB:**
Use `gsk8capicmd_64` to export the certificate and private key from the KDB file to PEM format.
2. **Convert the PEM files to a PKCS12 file:**
Use OpenSSL to combine the certificate and private key into a PKCS12 file.
3. **Import the PKCS12 file into a JKS:**
Use the `keytool` command to import the PKCS12 file into a Java KeyStore (JKS).
machine_or_job=$(echo "$machine_or_job" | tr '[:upper:]' '[:lower:]' | xargs)
if [[ ! "$machine_or_job" =~ ^(machine|job)$ ]]; then
echo "Variable does not represent a machine or job"
else
echo "Variable represents a machine or a job"
fi