Skip to content

Instantly share code, notes, and snippets.

@jpscharf
jpscharf / DnsMadeEastLeRecord.php
Created January 29, 2022 03:05
PHP Class to Add and Delete DNS Made Easy Records for Let's Encrypt
class DnsMadeEastLeRecord {
// Docs: https://api-docs.dnsmadeeasy.com
protected $api_key;
protected $api_secret;
protected $endpoint = 'https://api.dnsmadeeasy.com/V2.0/dns/managed';
public $domain;
public $domain_id;
public $acme_record_name = '_acme-challenge';
@jpscharf
jpscharf / v-cloak.md
Created November 28, 2016 04:46 — forked from adamwathan/v-cloak.md
Useful CSS utilities for Vue.js cloaking

Handy helpers for controlling visibility of elements until Vue has compiled.

Use like:

<div v-cloak>
  <h1>
    <span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
    <span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
 
Fresh byteorder v0.3.11
Fresh pkg-config v0.3.5
Fresh natord v1.0.8
Fresh matches v0.1.2
Fresh ansi_term v0.5.2
Fresh gcc v0.3.9
Fresh regex-syntax v0.2.0
Fresh rustc-serialize v0.3.15
Fresh threadpool v0.1.4
Fresh unicode-width v0.1.2
#!/usr/bin/env bash
PLUGIN_COMMANDS="
new-help,Print the list of commands
new-plugins,Print active plugins
new-plugins-install,Install active plugins
new-plugins-update,Update active plugins
old-help Print the list of commands
old-plugins Print active plugins
old-plugins-install Install active plugins
old-plugins-update Update active plugins
@jpscharf
jpscharf / 0_reuse_code.js
Last active August 29, 2015 14:06
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
@jpscharf
jpscharf / gist:9107727
Last active August 29, 2015 13:56
Plex - UnSupportedAppstore.bundle
2014-02-20 00:49:26,506 (7f62235bb700) : INFO (core:336) - Starting framework core - Version: 2.3.16, Build: 2167b3f (Mon Jan 27 21:33:51 UTC 2014)
2014-02-20 00:49:26,506 (7f62235bb700) : DEBUG (core:348) - Using the elevated policy
2014-02-20 00:49:26,506 (7f62235bb700) : DEBUG (core:437) - Starting runtime component.
2014-02-20 00:49:26,510 (7f62235bb700) : DEBUG (core:437) - Starting caching component.
2014-02-20 00:49:26,510 (7f62235bb700) : DEBUG (core:437) - Starting data component.
2014-02-20 00:49:26,510 (7f62235bb700) : DEBUG (core:437) - Starting networking component.
2014-02-20 00:49:26,511 (7f62235bb700) : DEBUG (networking:318) - Loaded HTTP cookies
2014-02-20 00:49:26,512 (7f62235bb700) : DEBUG (networking:504) - Setting the default network timeout to 20.0
2014-02-20 00:49:26,513 (7f62235bb700) : DEBUG (core:437) - Starting localization component.
2014-02-20 00:49:26,513 (7f62235bb700) : INFO (localization:408) - Setting the default locale to en-us
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... config/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking whether the C++ compiler works... yes
@jpscharf
jpscharf / gist:8227005
Created January 2, 2014 21:10
Vagrant - File Path with UTF8 - Debug Output
INFO global: Vagrant version: 1.4.2
INFO global: Ruby version: 2.0.0
INFO global: RubyGems version: 2.0.14
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/Applications/Vagrant/bin/../embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: VAGRANT_DETECTED_OS="Darwin"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_LOG="debug"
DEBUG global: Loading core plugin: /Applications/Vagrant/embedded/gems/gems/vagrant-1.4.2/plugins/commands/box/plugin.rb
INFO manager: Registered plugin: box command
#!/bin/sh -r
#
# Usage: ssh-copy-rmate [--bash] [user@]machine
#
# Shell script to install rmate on the remove server so we can open shell scripts locally.
# Author: Leon Radley (http://github.com/leon)
URL="https://raw.github.com/textmate/rmate/master/bin/rmate"
if [ "$#" -gt 1 ] || [ "$1" = "-b" ] || [ "$1" = "--bash" ]; then

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