Skip to content

Instantly share code, notes, and snippets.

@ryanrhanson
ryanrhanson / hardwaresummary.pl
Created February 10, 2014 19:10
Server Info Dumper, with ipmi and os credentials included.
# This is optional and can be removed if you already have the SoftLayer
# directory that contains this module in your @INC path.
use lib 'Softlayer';
use SoftLayer::API::SOAP;
use Data::Dumper;
my %config = do 'apiconfig.pl';
@ryanrhanson
ryanrhanson / acctAlarms.py
Last active August 29, 2015 13:56
Retrieve all active nimsoft alarms on account
import SoftLayer
apiUser = (api username)
apiKey = (api key)
client=SoftLayer.Client(username=apiUser,api_key=apiKey)
acctalarms=client['Account'].getActiveAlarms()
for alarm in acctalarms:
hostname = client['Monitoring_Robot'].getObject(id=alarm['robotId'],mask="mask[softwareComponent[virtualGuest,hardware]]")
@ryanrhanson
ryanrhanson / imageCapture.py
Created March 14, 2014 17:48
Flex image capture - Python
import SoftLayer
apiUser = <api user>
apiKey = <api key>
client = SoftLayer.Client(username=apiUser,api_key=apiKey)
serverId = <server id>
try:
@ryanrhanson
ryanrhanson / user_updateForumPassword.php
Created August 23, 2014 04:13
This corrects a deficiency in the SoftLayer portal, allowing you to update your forums.softlayer.com password so you can log into them directly, instead of going through the rest of the portal.
<?php
// apiconfig.php needs to have apiUsername, apiKey, and the path to the SLApi file that used to be in this script.
require_once('configuration/apiconfig.php');
$newPassword = readline("New password: ");
$client = SoftLayer_SoapClient::getClient('SoftLayer_Account', null, SLAPI_USER, SLAPI_KEY);
$user = $client->getCurrentUser();
@ryanrhanson
ryanrhanson / vyatta.pl
Created August 23, 2014 04:33
This horrible looking script will list all vyatta appliances on an account (from the Gateway Appliances section) along with a wealth of info about the one you select. It will also tell you the status of any vlan behind the vyatta (such as if it can support san or local disk virtual servers). Could be improved in many ways, I'm sure.
# This is optional and can be removed if you already have the SoftLayer
# directory that contains this module in your @INC path.
use lib 'Softlayer';
my %config = do 'apiconfig.pl';
use SoftLayer::API::SOAP;
use Data::Dumper;
use MIME::Base64;
use Data::Printer;
my $acctClient = SoftLayer::API::SOAP->new('SoftLayer_Account','',$config{apiUser},$config{apiKey});
@ryanrhanson
ryanrhanson / dupefinder.sh
Created October 12, 2014 05:41
Lists all users with duplicate password (and their password) - Tested with up to Plesk 11.5
#!/bin/sh
#Lists all users that share a password with other users. Sorted by the duplicate passwords. This could probably be optimized in a hundred different ways, but it works.
#Grab our list of duplicate passwords
mysql psa -BNse "select password from mail left join domains on mail.dom_id = domains.id inner join accounts where mail.account_id = accounts.id and postbox = 'true' group by password having COUNT(*) > 1" | while read -r line
do
echo "====="
echo "Users with password $line"
echo "====="
@ryanrhanson
ryanrhanson / crash-2025-04-08_22.57.45-client.txt
Created April 9, 2025 04:01
Crash log from corail tombstone/create: garnished interaction
---- Minecraft Crash Report ----
// I bet Cylons wouldn't have this problem.
Time: 2025-04-08 22:57:45
Description: Unexpected error
java.lang.IllegalStateException: Entity class net.minecraft.world.entity.vehicle.Boat has not defined synched data value 15
at TRANSFORMER/[email protected]/net.minecraft.network.syncher.SynchedEntityData$Builder.build(SynchedEntityData.java:167) ~[client-1.21.1-20240808.144430-srg.jar%23183!/:?] {re:classloading}
at TRANSFORMER/[email protected]/net.minecraft.world.entity.Entity.<init>(Entity.java:267) ~[client-1.21.1-20240808.144430-srg.jar%23183!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:tombstone.mixins.json:EntityMixin from mod tombstone,pl:mixin:APP:ponder.mixins.json:accessor.EntityAccessor from mod ponder,pl:mixin:APP:create.mixins.json:client.EntityContraptionInteractionMixin from mod create,pl:mixin:APP:create.mixins.json:EntityMixin from mod create,pl:mixin:A}
at TRANSFORMER/m