Skip to content

Instantly share code, notes, and snippets.

View hughker's full-sized avatar

Winston Hughes hughker

View GitHub Profile
@hughker
hughker / virtual.conf
Created October 3, 2016 00:59 — forked from tmaiaroto/virtual.conf
Nginx Virtual Host Setup for OS X using Homebrew
#
# A virtual host using mix of IP-, name-, and port-based configuration.
# This is based on using Homebrew for OS X. You can use this in other
# cases though, but you'll likely need to adjust some of the paths below.
#
server {
# Replace this port with the right one for your requirements
# listen 80 [default|default_server]; #could also be 1.2.3.4:80
@hughker
hughker / GIF-Screencast-OSX.md
Created September 29, 2016 03:56 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@hughker
hughker / Much much simpler option selector for Shopify
Created May 25, 2016 16:25 — forked from zakhardage/Much much simpler option selector for Shopify
Much simpler version of Shopify's option_selection.js for separating product options into their own dropdown menus.
<form action="/cart/add" method="post">
{% if product.variants.size > 1 %}
{% if product.options[0] %}
{% assign used = '' %}
<label for="select-one">{{ product.options[0] }}</label>
<select id='select-one' onchange="letsDoThis()">
{% for variant in product.variants %}
{% unless used contains variant.option1 %}
<option value="{{ variant.option1 }}">{{ variant.option1 }}</option>
{% capture used %}{{ used }} {{ variant.option1 }}{% endcapture %}
{% comment %}
Adds the following events:
* ViewContent on all pages
* Dynamic AddToCart on Product pages
* Dynamic InitiateCheckout from Cart page into Checkout
* Purchase on Checkout complete
{% endcomment %}
<!-- Shopify Theme Facebook Pixel Code -->
<script type="text/javascript">
!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?
@hughker
hughker / SassMeister-input.scss
Created May 10, 2016 19:38
Quantity queries for Sass
// ----
// libsass (v3.3.2)
// ----
// =========================================================================
//
// QUANTITY QUERIES FOR SASS
// -------------------------
// Indrek Paas @indrekpaas
//
@hughker
hughker / SassMeister-input.scss
Created May 10, 2016 19:37
Precise control over responsive typography for Sass
// ----
// libsass (v3.3.2)
// ----
// =========================================================================
//
// PRECISE CONTROL OVER RESPONSIVE TYPOGRAPHY FOR SASS
// ---------------------------------------------------
// Indrek Paas @indrekpaas
//
@hughker
hughker / jquery.positionRelativeTo.js
Created April 30, 2016 02:13 — forked from wpscholar/jquery.positionRelativeTo.js
A jQuery plugin that will position an element relative to another element, regardles of whether or not they share the same parent in the DOM.
(function ( $ ) {
/**
* A jQuery plugin that will position an element relative to another element, regardles of whether or not they share the
* same parent in the DOM.
*
* Note: This must be called within a $(document).ready() call to work properly. If loading images in the element
* that aren't specifically sized via CSS, it may be necessary to call this within a $(window).load() call
* depending on the positioning used.
*
@hughker
hughker / auth-basic.conf
Created April 29, 2016 04:17 — forked from Thermionix/auth-basic.conf
nginx reverse proxy for sickbeard, couchpotato etc.
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
@hughker
hughker / nginx.conf
Created April 29, 2016 04:03 — forked from spikegrobstein/nginx.conf
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
@hughker
hughker / README.md
Created April 12, 2016 13:43 — forked from rauchg/README.md
require-from-twitter