Skip to content

Instantly share code, notes, and snippets.

View mikedidthis's full-sized avatar

Mike Buttery mikedidthis

View GitHub Profile
This file has been truncated, but you can view the full file.
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap");
/*! tailwindcss v2.1.1 | MIT License | https://tailwindcss.com */
/*! modern-normalize v1.0.0 | MIT License | https://github.com/sindresorhus/modern-normalize */
/*
Document
========
*/
@johmun/vue-tags-input 😕 NOTUSED? Still using @johmun/vue-tags-input?
Depcheck did not find code similar to require('@johmun/vue-tags-input') or import from '@johmun/vue-tags-input'.
Check your code before removing as depcheck isn't able to foresee all ways dependencies can be used.
Use --skip-unused to skip this check.
To remove this package: npm uninstall --save @johmun/vue-tags-input
@sentry/browser 😍 UPDATE! Your local install is out of date. https://github.com/getsentry/sentry-javascript/tree/master/packages/browser
npm install --save @sentry/browser@5.6.3 to go from 5.6.2 to 5.6.3
core-js 😎 MAJOR UP Major update available. https://github.com/zloirock/core-js#read
@mikedidthis
mikedidthis / _typography.scss
Created February 7, 2014 12:30
A More Modern Scale for Web Typography - With REMS
// Modern Scale for Web Typography
// Ref: http://typecast.com/blog/a-more-modern-scale-for-web-typography
// -----------------------------------------------------------------------------
// Mobile
// -----------------------------------------------------------------------------
// Elem | Font | Line
// -----------------------------------------------------------------------------
// Body | 16px | 20px
// h1 | 32px | 40px
// h2 | 26px | 30px
@mikedidthis
mikedidthis / tweets.js
Created December 10, 2013 14:09
Parse Tumblr Tweets
function parseTweet(text) {
var patterns = {
link: /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig,
user: /(^|\s)@(\w+)/g,
hash: /(^|\s)#(\w+)/g
};
return text.replace(patterns.link,'<a href="$1" target="_blank">$1</a>')
.replace(patterns.user, '$1@<a href="http://www.twitter.com/$2" target="_blank">$2</a>')
.replace(patterns.hash, '$1#<a href="http://search.twitter.com/search?q=%23$2" target="_blank">$2</a>');
}
@mikedidthis
mikedidthis / objects.js
Last active December 21, 2015 21:09
How should this be named to make it clear to another developer what is going on. ( Related: http://stackoverflow.com/questions/18481599/replicating-constructors-and-new-with-object-create)
var app = app || {};
// This is the 'model / sigular'
app.Bottle = {
someFunc : function () {
},
someOtherFunc : function () {
}
};
@mikedidthis
mikedidthis / no-frills-social-sharing-urls.md
Last active May 3, 2024 19:39
No Frills Social Sharing URLs

###No Frills Social Sharing URLs

Not a huge fan of share buttons in general, but people seem to like them. Below is a list of social networks and their respective, good ol' fashion, URLs for sharing content.

[TITLE] indicates where to add your own title, url, description etc. Do not include the square brackets.

Feel free to add / update them, either in the comments or a fork.

Facebook

Tumblr - Creating informative shares from the index page.

Tumblr lacks the relevant template tags to provide more information, when sharing a post on a social network site, when the share request is made on from the index page.

Currently there are variables {PostTitle} and {PostSummary}, but these only rendered on the Permalink page.

The Goal

The goal is to replicate the information Tumblr creates for the Facebook OG meta tags (which is rendered on the permalink page). Although it is possible to generate the correct OG tags on the index page, this only provides support for Facebook, so other networks still need padding out.

@mikedidthis
mikedidthis / gist:5717416
Last active March 26, 2018 17:43
Typography Examples - As I got bored of re-writing this all the time. Credits: http://chrisvalleskey.com/fillerama/
<h1>A New Hope</h1>
<h2>Return of the Jedi</h2>
<h3>Rebel Mission to Ord Mantell</h3>
<h4>Return of the Jedi</h4>
<h5>Knights of the Old Republic</h5>
<h6>Return of the Jedi</h6>
<p>The plans you refer to will soon be back in our hands. All right. Well, take care of yourself, Han. I guess that's what you're best at, ain't it? Alderaan? I'm not going to Alderaan. I've got to go home. It's late, I'm in for it as it is. In my experience, there is no such thing as luck.</p>
<p>No! Alderaan is peaceful. We have no weapons. You can't possibly&hellip; The plans you refer to will soon be back in our hands. I find your lack of faith disturbing.</p>
<ul>
<li>In my experience, there is no such thing as luck.</li>