Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

10.0.0.x
10.0.1.x
10.0.2.x
10.0.3.x
10.0.4.x
10.0.5.x
10.0.6.x
10.0.7.x
10.0.8.x
10.0.9.x
@eddiez9
eddiez9 / semrush-cybercx-backlink-audit.csv
Last active December 8, 2023 04:31
Semrush Backlink Audit Output
# Needed for Graylog
fields_under_root: true
fields.collector_node_id: ${sidecar.nodeName}
fields.gl2_source_collector: ${sidecar.nodeId}
output.logstash:
hosts: ["192.168.1.13:5044"]
path:
data: ${sidecar.spoolDir!"C:\\Program Files\\Graylog\\sidecar\\cache\\winlogbeat"}\data
logs: ${sidecar.spoolDir!"C:\\Program Files\\Graylog\\sidecar"}\logs
# MongoDB setup and confguration
class {'mongodb::globals':
version => '5.0.22',
manage_package_repo => true,
bind_ip => ['127.0.0.1'],
}
-> class {'mongodb::client':}
-> class {'mongodb::server':
auth => true,
create_admin => true,
# Set timezone
class { 'timezone':
timezone => 'UTC',
}
# Set NTP servers
class { 'ntp':
servers => [ '0.au.pool.ntp.org', '1.au.pool.ntp.org', '2.au.pool.ntp.org', '3.au.pool.ntp.org'],
}
# Opensearch kernel config
wget https://apt.puppet.com/puppet7-release-focal.deb
sudo dpkg -i puppet7-release-focal.deb
sudo apt-get update
sudo apt-get install -y puppet-agent apache2-utils
/opt/puppetlabs/bin/puppet module install puppet-opensearch -i ./1-modules
/opt/puppetlabs/bin/puppet module install saz-timezone -i ./1-modules
/opt/puppetlabs/bin/puppet module install thias-sysctl -i ./1-modules
/opt/puppetlabs/bin/puppet module install puppetlabs-ntp -i ./1-modules
@eddiez9
eddiez9 / parse.py
Created December 28, 2022 04:48
Parses putty NAND dump log for information we care about
with open('dump.log') as file:
save = False
for line in file:
# Do we save this line?
if line.isspace():
continue
elif ("------------------ block: 1117" in line):
save = False
continue
elif ("------------------ block:" in line):
@eddiez9
eddiez9 / add_mgnt_user.sh
Created July 11, 2022 08:27
Nokia fastmile add_mgnt_user.sh script in /usr/exe directory
#!/bin/bash
#add MgntUser according to RI info, xufuguo, 20120808
#if user_name or password is NULL, do nothing.
#update for R30 read-only rootfs, modify by xufuguo, 20130816
#modify: not get MgntUserLongPasswd from RI. so call this script in pre-config instead of startup.sh xufuguo, 20120926
#user_name=$(ritool get UserName | grep UserName | awk -F : '{print $2}')
#password=$(ritool get MgntUserLongPasswd | grep MgntUserLongPasswd | awk -F : '{print $2}')
#!/bin/bash
# This script checks for the presence of a process using high GPU memory other than its own etherum miner, and terminates the miner. If it does not find such a process, it starts the miner.
MAX_MEMORY=500
MINER_NAME=t-rex
MINER_PATH="/home/trex/t-rex -a ethash -o stratum+tcp://asia1.ethermine.org:4444 -u WALLET_ADDRESS -w hashcat1"
# Get data on GPU processes
gpuprocs=$(nvidia-smi | head -n -1 | sed -n -e '19,999999 p' | awk 'BEGIN{ OFS = ";"; FS=" *"}{split($0,a);print a[5],a[6],(a[8]+0)}')
@eddiez9
eddiez9 / openssl.txt
Last active May 27, 2020 11:03
OpenSSL commands + SAN configuration
openssl req -out sslcert.csr -newkey rsa:2048 -nodes -keyout private.key -config san.cnf
[ req ]
default_bits = 2048
distinguished_name = req_distinguished_name
req_extensions = req_ext
[ req_distinguished_name ]
countryName = Country Name (2 letter code)
stateOrProvinceName = State or Province Name (full name)
localityName = Locality Name (eg, city)