Skip to content

Instantly share code, notes, and snippets.

View hughker's full-sized avatar

Winston Hughes hughker

View GitHub Profile
@hughker
hughker / ascii_arty.py
Created February 8, 2016 00:42 — forked from jdiaz5513/ascii_arty.py
Console ASCII Art Generator
#! /usr/bin/env python2
# Requires: PIL, colormath
#
# Improved algorithm now automatically crops the image and uses much
# better color matching
from PIL import Image, ImageChops
from colormath.color_conversions import convert_color
from colormath.color_objects import LabColor
from colormath.color_objects import sRGBColor as RGBColor
@hughker
hughker / speedtest-tweeter.py
Created February 3, 2016 17:53
Tweet Speed Test Results to Comcast / TWC / Anyone
#!/usr/bin/python
import os
import sys
import csv
import datetime
import time
import twitter
def test():
@hughker
hughker / readme.md
Created September 20, 2015 19:12
Bypass MailChimp Double Opt-In on Shopify via "New Customer Form"

All you need is the MailChimp for Shopify App installed + configured, then whenever someone fills out the form below, they're added as a new customer to Shopify and for whatever reason the MailChimp integration apparently also sees that a someone who also has opted to receive marketing emails...

{% form 'customer' %}
  {{ form.errors | default_errors }}
  <input type="email" placeholder="Email Address" name="contact[email]" id="email-input">
  <input type="submit" class="button" value="Join" name="subscribe" id="email-submit">
{% endform %}
@hughker
hughker / spinner.html
Created September 1, 2015 02:53
TNW Deals Spinner
<div class="us-spinner-wrapper ng-isolate-scope sc-loading" loading-spinner="" key="advance-checkout">
<div us-spinner="{length: 25, width: 7, radius: 34}" spinner-key="advance-checkout" class="ng-scope">
<div class="spinner" role="progressbar" style="position: absolute; width: 0px; z-index: 2000000000; left: 50%; top: 50%;">
<div style="position: absolute; top: -3px; -webkit-transform: translate3d(0, 0, 0); opacity: 0.25; -webkit-animation: opacity-100-25-0-12 1s linear infinite;">
<div style="position: absolute; width: 32px; height: 7px; background-color: rgb(0, 0, 0); -webkit-box-shadow: rgba(0, 0, 0, 0.0980392) 0px 0px 1px; -webkit-transform-origin: 0% 50%; -webkit-transform: rotate(0deg) translate(34px, 0px); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-position: initial initial; background-repeat: initial initial;"></div>
</div>
<div style="position: absolute; top: -3px; -webkit-tran
@hughker
hughker / MultiExporter.jsx
Last active August 29, 2015 14:27 — forked from TomByrne/MultiExporter.jsx
An Illustrator script for exporting layers and/or artboards into separate files (PNG8 / PNG24 / EPS / PDF / SVG / JPG / FXG).See http://www.tbyrne.org/export-illustrator-layers-to-svg-files
// MultiExporter.jsx
// Version 0.1
// Version 0.2 Adds PNG and EPS exports
// Version 0.3 Adds support for exporting at different resolutions
// Version 0.4 Adds support for SVG, changed EPS behaviour to minimise output filesize
// Version 0.5 Fixed cropping issues
// Version 0.6 Added inner padding mode to prevent circular bounds clipping
// Version 1.0
//
// Copyright 2014 Tom Byrne
@hughker
hughker / _fluid-grid-generator-mixin.scss
Last active August 29, 2015 14:26 — forked from markdurrant/_fluid-grid-generator-mixin.scss
Sass fluid grid generator mixin based on Twitter Bootstrap fluid grid.
// =======================================================================
// Fluid Grid Generator Mixin
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// Based on fluid grid from http://twitter.github.com/bootstrap/
// =======================================================================
//
//
// Parameters
// =======================================================================
@hughker
hughker / yosemiteBootUSB.sh
Created May 11, 2015 05:05
Mac OS X Yosemite Bootable USB Drive
sudo /Applications/Install OS X Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install OS X Yosemite.app --nointeraction
# Where 'Untitled' is the name of your USB Drive
@hughker
hughker / WaysWeWorkCSSTwerking.md
Last active August 29, 2015 14:20
Ways We Work (www.wayswework.io) CSS Twerking

#Ways We Work CSS Twerking Slight fixes for us still on iPhone 5's

I noticed that when browsing the site — this page specifically — there were a couple of buttons in the footer area that were busting outta their container.

Misbehaving Buttons

So I thought I would just see what was going on and see if it was an easy fix. Unless I'm mistaken, if you add the following lines of CSS to your simple_theme.css it should prevent the buttons from busting out.

@hughker
hughker / 1px.md
Last active July 12, 2019 11:34
base64 1px Gray GIF
<!-- 1px Transparent -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7">

<!-- 1px Gray -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==">

<!-- 1px Black -->
<img src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=">
@hughker
hughker / keybase.md
Created April 14, 2015 16:02
keybase.md

Keybase proof

I hereby claim:

  • I am hughker on github.
  • I am hughker (https://keybase.io/hughker) on keybase.
  • I have a public key whose fingerprint is CBAB CC59 B045 5F7B A8B0 2E55 131F A672 6351 08C8

To claim this, I am signing this object: