Skip to content

Instantly share code, notes, and snippets.

View nternetinspired's full-sized avatar

Seth Warburton nternetinspired

View GitHub Profile
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@nternetinspired
nternetinspired / Modernizr conditional loading
Created July 16, 2012 08:34
Conditional resource loading, using Modernizr's yepnope tests, based on viewport size. Placed immediately before the closing head tag in index.php this can be used to load specific resources against reported viewport sizes
<!-- Something like this -->
<script>
Modernizr.load({
test: Modernizr.mq('(min-width:400px)'),
yep: '<?php echo $this->baseurl ?>/templates/<?php echo $this->template ?>/js/not-small-screen-stuff.js">',
});
</script>
<!-- Or -->
<script>
@nternetinspired
nternetinspired / css3-seperator
Created April 11, 2012 20:04
A CSS3 breadcrumb seperator
ul.breadcrumbs li :after{
content:" ";
display:block;
width:1.45em;
height:1.45em;
border-top:1px solid rgba(0, 0, 0, 0.05);
border-right:1px solid rgba(0, 0, 0, 0.25);
-webkit-transform:rotate(45deg);
-moz-transform:rotate(45deg);
transform:rotate(45deg);
@nternetinspired
nternetinspired / gist:2995751
Created June 26, 2012 13:20
An example os Joomla system message styles
/* system messages */
dl#system-message {
border:1px solid #e5e5e5;
border:1px solid rgba(0,0,0,.15)
}
dl#system-message dt {
border-bottom:3px double #ddd;
border-bottom:3px double rgba(0,0,0,.1);
font-weight:700;
text-align:center;

How To Disable Strict SQL Mode in MySQL 5.7

I wrote a quick script for those that provision servers often enough.

To get this to work take the following steps

  1. Log into your server as root
  2. Get script wget https://gist.githubusercontent.com/nfourtythree/90fb8ef5eeafdf478f522720314c60bd/raw/disable-strict-mode.sh
  3. Make is executable chmod +x disable-strict-mode.sh
  4. Run the script ./disable-strict-mode.sh
@nternetinspired
nternetinspired / responsive-roots.scss
Created October 1, 2015 16:47
Setting the root font-size in % ensures device-specific sizing is not overruled.
html {
font-size: 100%;
@include mq($min, $sm) {
font-size: 106.3%; // 17px if the root was 16px
}
@include mq($min, $md) {
font-size: 112.5%; // 18px if the root was 16px
@nternetinspired
nternetinspired / _lazyFocusImager.twig
Last active September 20, 2017 08:19 — forked from hendrikeng/_lazyFocusImager.twig
Twig/Craft macro for lazy responsive images/bgimages with Imager and Focuspoint
{#
// lazyLoaded Image/bgImages, optimized with Imager and Focuspoint
---------------------------------------------------------------------------
https://github.com/aelvan/Imager-Craft
https://github.com/smcyr/Craft-FocusPoint
for the bgImage intrinsic ratio classname creation check:
https://github.com/inuitcss/inuitcss/blob/develop/objects/_objects.ratio.scss (modified in this revision to use a utility class prefix, , e.g; .u_ratio. @nternetinspired)
https://github.com/constancecchen/object-fit-polyfill
ul > li {
list-style-type: none; // Hide the real bullets
position: relative;
}
// Replace the hidden bullets with inserted bullets. Because CSS.
ul > li::before {
color: #bada55;
content: '•';
display: inline-block;
@nternetinspired
nternetinspired / GDPR.md
Created June 8, 2018 08:44
(Data) Protection Racket
.type.storage,.type.storage.declaration, .storage.class.modifier {
font-family: 'Gloria Hallelujah';
font-size: 1.7em;
}
.type.storage.arrow.function {
font-family: 'Fira Code'
}
.decorator.name, .decorator.punctuation:not(.block), .import.keyword {