Skip to content

Instantly share code, notes, and snippets.

View thetrickster's full-sized avatar

Chris Matthias thetrickster

View GitHub Profile
@zaygraveyard
zaygraveyard / viewport-units-ios.less
Last active April 9, 2019 18:44
LESS mixin to support vh and vw units on all iOS Safari versions. Based on an idea by Patrick Burtchaell's: https://gist.github.com/pburtchaell/e702f441ba9b3f76f587 and the SCSS version by Benjamin Morel's: https://gist.github.com/BenMorel/e9e34c08360ebbbd0634
/**
* Fix for vw, vh, vmin, vmax on iOS 7.
* http://caniuse.com/#feat=viewport-units
*
* This fix works by replacing viewport units with px values on known screen sizes.
*
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix.
* Target devices running iOS 8+ will incidentally execute the media query,
* but this will still produce the expected result; so this is not a problem.
*
Our favorite cruise was on the <i>Explorer of the Seas</i>, --> italicize the name of a ship
which we read about in <cite>Cruising</cite> magazine, --> reference the name of a publication
and we <em>loved</em> it. --> emphasize a feeling
(<b>Note:</b> This was before everyone got all sick --> start a note with bolded text
and was throwing up <strong>everywhere</strong>.) --> make a strong statement
@lunaroja
lunaroja / mail-test.php
Created April 22, 2015 05:20
wp_mail function test
<?php
/**
* Update variable settings.
* Load to your WP root folder.
*/
// Set $to as the email you want to send the test to
$to = "";
// No need to make changes below this line
@kosmiq
kosmiq / js_google_fonts_async_ieshim
Last active October 17, 2017 11:34 — forked from thomasmb/gist:b67680a04ae75bc301b7
An updated version of Thomas Bensmanns Load Google Fonts via JS (https://bensmann.no/google-webfonts-performance/) with a SHIM for IE9 and IE8.
WebFontConfig = {
google: { families: [ \'Ek+Mukta:200,800:latin\' ] }
};
var cb = function() {
var wf = document.createElement(\'script\');
wf.src = \'//ajax.googleapis.com/ajax/libs/webfont/1/webfont.js\';
wf.type = \'text/javascript\';
wf.async = \'true\';
var s = document.getElementsByTagName(\'script\')[0];
s.parentNode.insertBefore(wf, s);
@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@mattnorris
mattnorris / github-pages.md
Created April 4, 2013 01:56
How to create a GitHub page using Jekyll and Bootstrap

Creating Whispernote's GitHub Project Page

Jekyll, GitHub's static site generator, and Bootstrap were used to create Whispernote's GitHub Project Page. This document shows how.

Project Goals

I wanted a stylish "brand" page for my project, and I wanted to reuse the README file I had created without a lot of copy/pasting. GitHub's Jekyll allowed me to essentially embed the file as a partial. What I got was really an enhanced README file (thanks to some jQuery and Bootstrap), which is exactly what I wanted.

gh-pages

@marcialca
marcialca / gist:4151769
Created November 27, 2012 01:17
[MYSQL]WP from local to server
UPDATE wp_options SET option_value = replace(option_value, 'http://localhost:8888/wordpress', 'http://www.YOUR_SITE_URL.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = REPLACE (guid, 'http://localhost:8888/wordpress', 'http://www.YOUR_SITE_URL.com');
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://localhost:8888/wordpress', 'http://www.YOUR_SITE_URL.com');
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://localhost:8888/wordpress','http://www.YOUR_SITE_URL.com');