Skip to content

Instantly share code, notes, and snippets.

View notasausage's full-sized avatar
👨‍💻
Design + Code

Patrick Haney notasausage

👨‍💻
Design + Code
View GitHub Profile
EMAIL-GREP-PATTERN
<!-- Please remove all commented out code before using. Visit https://gist.github.com/ccstone/5385334 for more regular expressions available in TextWrangler -->
<!-- \r is line break, \s is non whitespace, \t tab, this looks for table cells and image tags with missing attributes -->
|<td>|<td>\r*?\s*?\t*?<img|(<img\s*(?!.*\r*?.*?\r*?.*?display: ?block.*?\r?))
<!-- image formatting and styles: height, width, block, alt text -->
|<img\s*(?!.*\r*?.*?\r*?.*?height.*?\r?)|<img\s*(?!.*\r*?.*?\r*?.*?width.*?\r?)
<!-- break tag variants -->
|<br/>|<br>
<!-- special characters -->
@marcysutton
marcysutton / chrome-a11y-experiment-instructions.md
Last active January 31, 2023 22:07
Enable Chrome Accessibility Experiment

NOTE: This is no longer an experiment! You can use the accessibility inspector in Chrome Devtools now, including a fantastic color contrast inspection tool. Read more: https://developers.google.com/web/updates/2018/01/devtools#a11y


Just like any good element inspector helps you debug styles, accessibility inspection in the browser can help you debug HTML and ARIA exposed for assistive technologies such as screen readers. There's a similar tool in Safari (and reportedly one in Edge) but I like the Chrome one best.

As an internal Chrome experiment, this tool differs from the Accessibility Developer Tools extension in that it has privileged Accessibility API access and reports more information as a result. You can still use the audit feature in the Chrome Accessibility Developer Tools, or you could use the aXe Chrome extension. :)

To enable the accessibility inspector in Chrome stable:

@iftee
iftee / wp-remove-default-image-sizes.php
Last active November 12, 2022 00:21
Custom filter to remove default image sizes (WordPress and WooCommerce) from your theme.
<?php
/*
* Custom filter to remove default image sizes from WordPress.
*/
/* Add the following code in the theme's functions.php and disable any unset function as required */
function remove_default_image_sizes( $sizes ) {
/* Default WordPress */
unset( $sizes[ 'thumbnail' ]); // Remove Thumbnail (150 x 150 hard cropped)
@glueckpress
glueckpress / GitHub-Desktop-Bitbucket.md
Last active June 20, 2023 08:16
[How-to] Use GitHub Desktop to clone and commit to a Bitbucket repository just as you would with any GitHub repository. (Mac)

⚠️ Note: this guide is from 2016 – a long time on the internet. Content may be outdated, check the comments for more recent info.


Clone Bitbucket Repository and Add it to GitHub Desktop App (Mac)

You can’t clone a Bitbucket repo using GithHub Desktop directly. Instead you would have to:

  1. Clone the Bitbucket repo locally via command line.
  2. Add the cloned repository to your GitHub Desktop app.
" Make IE Better Compatible "
<!--[if IE]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
======================================================
IE6 Only
==================
_selector {...}
@kchez
kchez / e_WrapperTable--FixedWidth.html
Last active August 28, 2023 18:26
Email Wrapper Table - Fixed Width Approach
<!-- WRAPPER TABLE -->
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="wrappertable" style="table-layout:fixed;">
<tr>
<!--
ALIGNING LAYOUTS TO THE CENTER:
In some cases, you may want the whole email layout to be centered (mainly for desktop clients).
Using the wrapping table cell approach is a clean way of doing it, removing the need for any <center> or <div> tags.
It does mean however you'll need to use the align attribute on all table cells within to avoid content being centered.
-->
<td align="center" valign="top" id="wrappercell">
@bradonomics
bradonomics / .gitignore
Last active May 6, 2022 20:25
.gitignore file for Jekyll projects
### Jekyll ###
_site
.jekyll-metadata
*-cache/
### NPM ###
/node_modules/
@bryandugan
bryandugan / Craft CMS SEO Meta.twig
Last active October 9, 2022 15:21
Craft CMS SEO Meta Tags
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="{{ siteUrl }}favicon.png">
<title>{% if homeTitle is defined %}{{ siteName }} | {{ entry.homeTitle }}{% elseif entry.title is defined %}{{ entry.title }} | {{ siteName }}{% else %}{{ title }} | {{ siteName }}{% endif %}</title>
<link rel="stylesheet" href="{{ siteUrl }}assets/css/app.css" />
<script src="{{ siteUrl }}assets/bower_components/modernizr/modernizr.js"></script>
<!-- General Page Meta -->
{% if entry.seoDescription is defined %}
{% if entry.seoDescription is not empty %}
@parrots
parrots / CachingInterfaceController.h
Created April 14, 2015 02:32
CachingInterfaceController
@import WatchKit;
@interface CachingInterfaceController : WKInterfaceController
- (void)updateLabel:(WKInterfaceLabel *)label withString:(NSString *)string;
- (void)updateLabel:(WKInterfaceLabel *)label asHidden:(BOOL)hidden;
- (void)updateImage:(WKInterfaceImage *)image withImageNamed:(NSString *)imageName;
- (void)updateImage:(WKInterfaceImage *)image withBaseNameForAnimation:(NSString *)baseName withRange:(NSRange)range duration:(NSTimeInterval)duration repeatCount:(NSInteger)repeatCount;
- (NSString *)currentImageNameForImage:(WKInterfaceImage *)image;
@p3t3r67x0
p3t3r67x0 / prefixed-office-properties.md
Last active February 20, 2024 19:15
MS Office prefixed style properties can be used for older versions of MS Excel, MS PowerPoint or MS Word when you want to save a document, presentation, workbook, or worksheet as a web document, or even in older versions for MS Outlook.

MS Office prefixed style properties

mso-ansi-font-size

Note: Office only

mso-ansi-font-size: large | larger | <length> | medium | <percentage> | small | smaller | x-large | x-small | xx-large | xx-small