Skip to content

Instantly share code, notes, and snippets.

View stevep's full-sized avatar

Steve Pfisterer stevep

  • Stout Logic, LLC
  • Chicago, IL
View GitHub Profile

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@stevep
stevep / acf-filters.md
Last active June 21, 2017 15:59
ACF Builder field filters

Registering Field

$builder = new FieldsBuilder('page_info');
$builder
  ->addText('title')
  ->setLocation('post_type', '==', 'page');
  
$builder = apply_filters('modify_page_info_fields', $builder);
acf_add_local_field_group($builder->build());
@stevep
stevep / curl.md
Last active June 20, 2017 13:34
WordPress Curl Replacement

If you’re sending json, your code should look something like this:

$response = wp_remote_post($url, array(
    'headers'   => array('Content-Type' => 'application/json; charset=utf-8'),
    'body'      => $json,
    'method'    => 'POST'
));

if ( is_wp_error( $response ) ) {
 die($response->get_error_message());
<?php
namespace StoutLogic\YoungDental\Fields;
class BrandSlide extends \Understory\ACF\FieldGroup
{
protected function configure($builder)
{
return $builder
->addText('title')
@stevep
stevep / 0_reuse_code.js
Created July 29, 2016 16:28
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#!/bin/bash
#
# This script is triggered by crontab every 5 minutes.
# Logs to /var/log/ui-server/<host>-rails_check.log.
log_dir=/var/log/my_rails_app
mkdir -p $log_dir
log_file=$log_dir/$(hostname)-rails_check.log
# Limits in MB
Posted: December 2, 2010 @ 9:50 PM
Hi Shawn,
I realize that my 3 year warranty just expired a little over a month ago. However, the issue with this power supply is a well-documented issue: http://www.google.com/search?q=lacie+hissing+power+supply
I'm actually surprised a recall hasn't been issued on the power supply. It is so common there are even youtube videos guiding users of how to manually replace the bad capacitors in the power supply in order to avoid having to keep paying $20 to keep their unit functional.
I've never had the power brick die like that on any electronic device. I expected the hard drive to fail before anything else. I wasn't even constantly using it, but only on a weekly basis to back up my computer. I thought Lacie would be more willing to stand behind their products. Now I'm worried about the other Lacie external hard drive I have of a different model. I understand a warranty expiring on the actual hard disk because there are moving parts prone to eventual failure, but not a power su