Skip to content

Instantly share code, notes, and snippets.

Avatar

Bryan "BJ" Hoffpauir beejhuff

View GitHub Profile
@beejhuff
beejhuff / codementor_test.md
Last active Sep 25, 2018
Markdown for CodeMentor Contact Button
View gist:2873ea7e34097a9c4623c8169375e168
# cribed from this post
# http://onethingwell.org/post/27835796928/remote-ssh-bact-to-my-mac
dns-sd -E # gets your member id for icloud
# SSH command
ssh -2 -6 [USERNAME]@[COMPUTER NAME].[account number].members.btmm.icloud.com
# ~/.ssh/config
Host mac-remote
View safer-magento-registration-emails.md

Safer Magento Registration Emails

This is a little idea for a module maybe for a hackathon or something. Magento includes passwords in plain text in registration emails by default. In some cases you can just suppress the password, but in other cases you can't - for example if you have customer service reps creating accounts over the phone that need to generate password and send them to customers.

So - how about integrating with readthenburn.com to send email passwords, or perhaps generating temporary password that expire after a day or two, requiring them to use the forgot password if they didn't login by that time.

@beejhuff
beejhuff / how-to-set-up-stress-free-ssl-on-os-x.md
Created Oct 27, 2017 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine
View how-to-set-up-stress-free-ssl-on-os-x.md

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

@beejhuff
beejhuff / wip.py
Created Oct 26, 2016 — forked from phips/wip.py
VMware Fusion Ansible dynamic inventory
View wip.py
#!/usr/bin/env python
import sys
import subprocess
import re
import string
try:
import json
except:
import simplejson as json
@beejhuff
beejhuff / magento-nginx.conf
Created Oct 15, 2016 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
View magento-nginx.conf
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
@beejhuff
beejhuff / onename.txt
Created Oct 13, 2016
OneName Blockstack ID
View onename.txt
Verifying that "beejhuff.id" is my Blockstack ID. https://onename.com/beejhuff
View Rss.php
<?php
/**
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
*/
namespace Magento\Wishlist\Helper;
class Rss extends \Magento\Wishlist\Helper\Data
{
/**
View rss_parser_test.exs
require Record
defmodule RssParserTest do
Record.defrecordp :xmlElement, Record.extract(:xmlElement, from_lib: "xmerl/include/xmerl.hrl")
Record.defrecordp :xmlText, Record.extract(:xmlText, from_lib: "xmerl/include/xmerl.hrl")
Record.defrecordp :xmlAttribute, Record.extract(:xmlAttribute, from_lib: "xmerl/include/xmerl.hrl")
use ExUnit.Case
def sample_atom_xml do
"""