Skip to content

Instantly share code, notes, and snippets.

View macbleser's full-sized avatar

Mac Bleser macbleser

View GitHub Profile
@macbleser
macbleser / SassMeister-input.scss
Created June 20, 2014 07:44
Generated by SassMeister.com.
// ----
// Sass (v3.3.8)
// Compass (v1.0.0.alpha.19)
// ----
%icon-base-styles {
display: inline-block;
font-family: "icons";
font-style: normal;
font-weight: normal;
@macbleser
macbleser / foundation-grid-columns-mixin
Last active August 29, 2015 14:02
Foundation Grid Columns Mixin
//
// Grid Columns
//
// A mixin to help make Foundation's grid-column mixin easier
// to use when specifying multiple media quries/screen sizes
@mixin grid-columns(
// Mobile First Media Queries
$small-up-screens: false,
$medium-up-screens: false,
@macbleser
macbleser / BEM Nav
Created March 26, 2014 17:51
BEM Nav
<nav role="navigation">
<ul class="nav__list">
<li class="nav__list__item">
<a href="" class="nav__link"></a>
</li>
<li class="nav__list__item">
<a href="" class="nav__link--active"></a>
</li>
<li class="nav__list__item">
<a href="" class="nav__link"></a>
@macbleser
macbleser / htaccess-redirect-to-specific-port
Created March 9, 2014 05:46
.htaccess redirect to specific port
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^macbleser.dev$ [NC]
RewriteCond %{HTTPS} off
RewriteRule ^ http://macbleser.dev:2368%{REQUEST_URI} [P,QSA,L]
@macbleser
macbleser / wp-permissions-script
Created February 21, 2014 15:37
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # &lt;-- wordpress owner
WP_GROUP=changeme # &lt;-- wordpress group
WP_ROOT=/home/changeme # &lt;-- wordpress root directory
@macbleser
macbleser / gist:7635684
Created November 25, 2013 03:09
keys.php example for wp-composer-base
<?php
//encryption
$secrets['auth_key'] = '';
$secrets['secure_auth_key'] = '';
$secrets['logged_in_key'] = '';
$secrets['nonce_key'] = '';
$secrets['auth_salt'] = '';
$secrets['secure_auth_salt'] = '';

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@macbleser
macbleser / Color-Queries.markdown
Created November 20, 2013 18:58
A Pen by Mac Bleser.

Color Queries

Curious as to how the browser would react to several hundred media queries, I decided to create this experiment.

In order to demonstrate each individual media query, I found a list of over 1,000 unique colors to use to apply a unique background color to each media query. To make sure the text color is readable on top of any given background color, I am using Sass to return the complementary color of the background color.

The first media query kicks in at min-width: 320px, and each new media query thereafter increments by 1px. This continues all the way up to min-width: 1400px.

Resize your the preview window and watch the colors change as the media queries kick in!