Skip to content

Instantly share code, notes, and snippets.

View markjaquith's full-sized avatar

Mark Jaquith markjaquith

View GitHub Profile
@markjaquith
markjaquith / nginx.erb
Created April 19, 2014 17:21
Nginx setup
server {
listen 80;
<% if @use_ssl %>
listen 443 ssl spdy;
ssl_certificate ssl/<%= @domain %>/server.crt;
ssl_certificate_key ssl/<%= @domain %>/server.key;
<% end %>
server_name <%= @domain %><% if @also_www %> www.<%= @domain %><% end %>;
access_log /var/log/nginx/access.log main;
@markjaquith
markjaquith / cloudup.com.coffee
Created March 2, 2014 18:48
dotjs-zen script to make Cloudup images link to the raw image URL (for dragging, easy direct sharing, etc)
require 'jqueryify'
jQuery ($) ->
waitForImgLoad = ->
collection = $ '.collection-item.complete.loaded'
if collection.length
img = $ '.img-wrapper img', collection
if img.length
return img.each (n,i) ->
$i = $ i
@markjaquith
markjaquith / off-limits-when-not-home.groovy
Last active August 29, 2015 13:56
Alerts me when someone opens my office door when I'm not at home
/**
* My office is off-limits when I am gone
*
* Author: Mark Jaquith
* Date: 2014-03-01
*/
preferences {
section("Monitor this door") {
input "door", "capability.contactSensor"
Hey. Crazy kids. This probably needs to be that one event where you sort of realize: "Oh. Shit. Other people...like...use this & stuff. We need a damn road map and a release schedule. Stop smoking dabs all day, breh."
Now is also a great time to learn how to think about the potential ramifications a production push will have prior to making said production push. And, if your change might impact some or perhaps even all of the other people who use your technology, then some degree of coordination - perhaps an email? - would be nice. It's one of those things that will help make you look professional. I suck at professionalism. You have no idea. But, even I know this much.
Because, right now, I sort of feel like I'm asking some very rightfully fearful people to consider entrusting perhaps their actual career into the development of technology they need to succeed and thrive. And, I just started recommending Node.js - with a caveat - that npm basically sucks. I hate having to do that and it needs to stop.
So, h
<?php
/**
* Genesis Front Page Manager
*
* @package Genesis_Front_Page_Manager
* @author Brad Potter
* @license GPL-2.0+
* @link http://www.bradpotter.com/plugins/genesis-front-page-manager
* @copyright Copyright (c) 2014, Brad Potter
*/
@markjaquith
markjaquith / fix-twitter-https.php
Created January 21, 2014 02:14
Fix Twitter embeds in WordPress < 3.8.1
<?php
add_filter( 'oembed_providers', 'oembed_fix_twitter', 10, 1 );
function oembed_fix_twitter( $providers ) {
$providers[ '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i' ] = array( 'https://api.twitter.com/1/statuses/oembed.{format}', true );
return $providers;
}
<?php
/*
Plugin Name: SQMS Remove Menu Items
Plugin URI: http://sequoiaims.com
Description: Plugin for Sequoia MasterSite to remove menu items based on current user level
Author: Ryan Olson
Author URI: http://thatryan.com
Version: 1.1
*/
//* Add the site tagline section
add_action( 'genesis_after_header', 'minimum_site_tagline');
function minimum_site_tagline() {
if ( !is_page( 'ಠ_ಠ' ) )
printf( '<div %s>', genesis_attr( 'site-tagline' ) );
genesis_structural_wrap( 'site-tagline' );
printf( '<div %s>', genesis_attr( 'site-tagline-left' ) );
printf( '<p %s>%s</p>', genesis_attr( 'site-description' ), esc_html( get_bloginfo( 'description' ) ) );
echo '</div>';
@markjaquith
markjaquith / gist:7094389
Last active July 14, 2019 20:46
Healthcare.gov got very confused about my family relationships. I took to their Live Chat feature for help.

[10:18:00 pm]: Thanks for contacting Health Insurance Marketplace Live Chat. Please wait while we connect you to someone who can help.
[10:18:03 pm]: Please be patient while we're helping other people.
[10:18:07 pm]: Welcome! You're now connected to Health Insurance Marketplace Live Chat.

Thanks for contacting us. My name is Mark. To protect your privacy, please don't provide any personal information, like Social Security Number, or any other sensitive medical or personal information.
[10:19:37 pm]: Mark Do you have any questions that I can help you with?
[10:20:30 pm]: Mark I seem to be stuck in some sort of redneck family relationship loop.
[10:21:37 pm]: Mark It thinks my wife is my grandaughter, my second son is my first son's father, and that my wife is the sister of my sons. And now it thinks that one of my sons is his own brother. And also possibly his own legal guardian.
[10:23:53 pm]: Mark I'm also considering the possibility that you are actually me, from the fu

@markjaquith
markjaquith / gist:7029068
Created October 17, 2013 17:37
How to get git-svn working in OS X Mavericks with Homebrew
sudo xcodebuild -license
xcode-select --install # There will be a GUI prompt
sudo cpan SVN::Core # use the "sudo" method when prompted
# Then add this to your ~/.profile:
# export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATH
# Then probably:
brew reinstall git
brew reinstall subversion