Skip to content

Instantly share code, notes, and snippets.

View scrothers's full-sized avatar

Steven Crothers scrothers

View GitHub Profile
apiVersion: v1
kind: Namespace
metadata:
name: elasticsearch
---
apiVersion: v1
kind: Namespace
metadata:
name: elasticsearch
---
@scrothers
scrothers / connect.php
Created July 13, 2017 06:19
Connecting to /var/run/docker.sock with PHP
<?PHP
use GuzzleHttp\Psr7\Uri;
use Http\Client\Common\Plugin\ContentLengthPlugin;
use Http\Client\Common\Plugin\DecoderPlugin;
use Http\Client\Common\Plugin\ErrorPlugin;
use Http\Client\Common\PluginClient;
use Http\Message\MessageFactory\GuzzleMessageFactory;
use Http\Client\Socket\Client;
<?PHP
function solver($firstNumber, $secondNumber) {
return ($firstNumber * $secondNumber) + $firstNumber;
}
@scrothers
scrothers / fix-code-manager.sh
Created June 22, 2016 18:50
Deployment issue with puppetlabs/puppetlabs-dsc and Puppet Enterprise
#!/bin/bash
# Directories to clear out to fix filesync.
DIRS=(
"/opt/puppetlabs/server/data/puppetserver/filesync/client"
"/opt/puppetlabs/server/data/puppetserver/filesync/storage"
"/etc/puppetlabs/code/environments"
"/etc/puppetlabs/code-staging/environments"
)
@scrothers
scrothers / keybase.md
Created March 15, 2016 19:42
keybase.md

Keybase proof

I hereby claim:

  • I am scrothers on github.
  • I am crothers (https://keybase.io/crothers) on keybase.
  • I have a public key whose fingerprint is 6D6A 2BF8 DA78 FCF8 358B 8D26 63DB ECDF B8EC 6731

To claim this, I am signing this object:

@scrothers
scrothers / keybase.md
Created March 15, 2016 19:40
keybase.md

keybase.md

dns3.registrar-servers.com
etc
10:14:01 AM CPU %user %nice %system %iowait %steal %idle
10:15:01 AM all 4.63 0.00 1.89 3.05 0.00 90.43
10:16:01 AM all 4.29 0.00 1.46 2.59 0.00 91.66
10:18:01 AM all 4.19 0.00 1.59 3.18 0.00 91.04
10:20:01 AM all 4.06 0.00 1.59 2.80 0.00 91.55
10:22:01 AM all 3.68 0.00 1.47 2.87 0.00 91.99
10:24:01 AM all 4.89 0.00 1.53 2.88 0.00 90.70
10:25:01 AM all 4.27 0.00 1.69 2.99 0.00 91.05
10:26:01 AM all 6.97 0.00 1.72 3.16 0.00 88.15
10:28:01 AM all 4.71 0.00 1.55 2.94 0.00 90.80
@scrothers
scrothers / RESPONSE
Last active August 29, 2015 14:24
routes.php
DomainException in RouteCompiler.php line 99:
Variable name "32" cannot be numeric in route pattern "/{token:([a-f0-9]{32})}". Please use a different name.
=> <App\User #000000003ef0b9470000000164bf4321> {
id: 1,
uniqueid: "6448d177",
username: "reichert.melissa",
email: "aubree53@gmail.com",
firstname: "Toy",
middlename: "Rowan",
lastname: "Prohaska",
dobyy: 65,
dobmm: 8,