Skip to content

Instantly share code, notes, and snippets.

Geoffrey Hoffman phpguru

Block or report user

Report or block phpguru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@phpguru
phpguru / salt-call-output.log
Created Nov 4, 2018
Output of salt-call state.show_highstate
View salt-call-output.log
root@saltmaster:/srv/salt# salt-call state.show_highstate
local:
----------
psmisc:
----------
pkg:
- installed
|_
----------
order:
@phpguru
phpguru / state-apply-terminal-output.log
Last active Nov 3, 2018
Strange output from state.apply test=True
View state-apply-terminal-output.log
root@saltmaster:/srv# salt 'api*' state.apply test=True
dev-server.on-my.network:
----------
ID: /etc/hosts
Function: file.comment
Result: None
Comment: File /etc/hosts is set to be updated
Started: 16:09:10.954681
Duration: 8.716 ms
Changes:
@phpguru
phpguru / duplicate_music_fixer.php
Last active Jul 6, 2018
PHP Script to find and delete duplicate mp3 files
View duplicate_music_fixer.php
<?php
/**
* This script will search in your iTunes Music folder for duplicate
* mp3 and aac files, and print them out for inspection.
*
* HOW TO USE:
* Do a dry run, inspect the output, and if desired, do a delete run.
*
* To do a dry run:
*
@phpguru
phpguru / r10ku.sh
Last active Aug 29, 2015
Force update a specific puppet environment using r10k with clearing cache
View r10ku.sh
#!/bin/bash
#
# Update a specific puppet environment, typically a git branch `featurename`
# or one of your deployment environments, typically `development` or `production`
#
# Save the script as r10ku somewhere in your $PATH and chmod +x it
#
# example usage:
#
# > sudo su -
View Environment.php
<?php
class Environment {
/**
* Current environment
*
* @var string
*/
static protected $env;
View Autoload.php
<?php
/**
* TODO: Add support for namespaces... If we ever move to PHP 5.3+
*/
class Autoload {
/**
* Class directories
*
View Input.php
<?php
class Input {
/**
* Protocol (http or https)
*
* @return string
*/
static public function protocol() {
View Curl.php
<?php
class Curl {
/**
* cURL request method
*
* @var string
*/
protected $_method = 'GET';
View Crypt.php
<?php
class Crypt {
/**
* The encryption cipher
*
* @var string
*/
static public $cipher = MCRYPT_RIJNDAEL_256;
View Date.php
<?php
/**
* Date class
*/
class Date {
/**
* Fuzzy date strings
*
* @var array
You can’t perform that action at this time.