Skip to content

Instantly share code, notes, and snippets.

View randy-johnson's full-sized avatar

Randy Johnson randy-johnson

View GitHub Profile
@randy-johnson
randy-johnson / s3cmd.md
Created August 31, 2022 11:31 — forked from abhinavmsra/s3cmd.md
Install s3cmd on CentOs

Installing s3cmd on CentOs

  1. As a superuser, go to /etc/yum.repos.d

    cd /etc/yum.repos.d

  2. Download the repo file

    wget http://s3tools.org/repo/RHEL_6/s3tools.repo

@randy-johnson
randy-johnson / gist:1d71ad3d71034847b96f7071b50665a6
Created April 7, 2022 11:35 — forked from steveheinsch/gist:287edd5ce26e608b06b20af384f4cc1e
Function to retrieve all lookup key/values for a Resource/Class in PHRETS 2+
<?php
// Note: $this->server is a "logged in" PHRETS $session
public function getLookupValues($resourceName, $className)
{
$results = array();
// Get Table Metadata for this resource/class
$tableMeta = $this->server->GetTableMetadata($resourceName, $className);
@randy-johnson
randy-johnson / custom_keys_git_ssh
Created July 18, 2021 13:41 — forked from vhermecz/custom_keys_git_ssh
Allow configuring multiple ssh deploy keys with git
#!/bin/bash
# Script to use custom ssh keys for various git repositories
# Run without arguments to get usage info.
#
# How it works:
# When used with SSH, git sends the path to the repository in the SSH command.
# @see: https://github.com/git/git/blob/e870325/connect.c#L1268
# We extract this info and search for a key with the name.
# Based on the source, this seems to be used format since v2.0 at least.
# @see: https://github.com/git/git/commit/a2036d7
@randy-johnson
randy-johnson / JavaAgentHelper.cfc
Created February 12, 2021 17:14 — forked from bennadel/JavaAgentHelper.cfc
Dynamically Instrumenting ColdFusion Component Methods With FusionReactor Tracked Transactions In Lucee CFML 5.2.9.40
component
output = false
hint = "I help interoperate with the Java Agent that is instrumenting the ColdFusion application (which is provided by FusionReactor)."
{
// I initialize the java agent helper.
public any function init() {
// The FusionReactor Agent is not available in all contexts. As such, we have to
// be careful about trying to load the Java Class; and then, be cautious of its
@randy-johnson
randy-johnson / gen-ssh-keys
Created January 30, 2020 03:14 — forked from triztian/gen-ssh-keys.md
DigitalOcean Generate SSH keys
# Adding SSH Keys to Droplets
## How it Works
You can add SSH keys to DigitalOcean which can then be selected during the droplet create process to add the selected SSH keys under the root user.
When using SSH keys a root password will no longer be set as SSH keys will be used as the preferred method of access.
We do not manage the server after creation, so editing, adding, or removing SSH keys from the SSH interface will not affect any of the stored keys on droplets that you have created.
@randy-johnson
randy-johnson / xero.cfc
Last active August 29, 2015 14:14 — forked from mjb/xero.cfc
<!-----------------------------------------------------------------------------------
@@Author: Matthew Bryant
@@Company: TORO Waste Equipment
@@license: The MIT License (http://opensource.org/licenses/MIT)
@@Version: 0.1 $
@@Description: For use with Xero API (https://api.xero.com)
STEP 1. GENERATE SSL KEY
1.1. Download openSSL for windows: http://slproweb.com/products/Win32OpenSSL.html