Skip to content

Instantly share code, notes, and snippets.

View eikeco's full-sized avatar
👽

Ryan Smith eikeco

👽
View GitHub Profile
@necolas
necolas / README.md
Last active March 28, 2024 20:34
Experimenting with component-based HTML/CSS naming and patterns

NOTE I now use the conventions detailed in the SUIT framework

Template Components

Used to provide structural templates.

Pattern

t-template-name
@arieh
arieh / Outliner.js
Created April 23, 2012 12:41
Cross-Lib accessible outline removal
/*!
Copyright (c) <2012> <Arieh Glazer>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
@nickawalsh
nickawalsh / _settings.sass
Last active October 8, 2015 05:28
Serve IE Responsive Desktop Version
=respond-to($value, $query: min-width, $ie: false)
@media ($query: $value)
@content
@if $ie
.ie &
@content
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@liamr
liamr / vendor_mixin.scss
Created May 20, 2013 10:02
Nice little vendor prefix mixin for scss
@mixin vendor($property, $value...){
-webkit-#{$property}:$value;
-moz-#{$property}:$value;
-ms-#{$property}:$value;
-o-#{$property}:$value;
#{$property}:$value;
}
@liamr
liamr / gist:9104020
Created February 19, 2014 23:48
Open external links in a new window
$("a[rel=external], a[href^='http:']:not([href*='" + window.location.host + "']), a[href^='https:']:not([href*='" + window.location.host + "'])").each(function(){
$(this).attr("target", "_blank");
});
@onestepcreative
onestepcreative / devmode-console-helper.js
Last active October 27, 2020 19:55
Color code your console log messages with a shorter syntax to console.log and easily turn off console logging by setting a DEV_MODE variable to false.
/*
Author: Josh McDonald
Twitter: @onestepcreative
Website: joshmcdonald.net
A simple helper to log color coded messages to the
javascript console, using a shorter syntax to console.log
You can leave your dev.log() statements scattered throughout
@hijonathan
hijonathan / form.html
Last active August 1, 2023 19:14
Submit a HubSpot form with AJAX without redirecting the user.
<form class='form-inline' id='my-custom-form'>
<div class="form-group">
<input type='email' class='form-control' placeholder='Your email address' required>
</div>
<button class="btn btn-primary" type='submit'>Sign up</button>
</form>
<!-- Actual form that gets submitted to HubSpot -->
<div class="hidden" id='hubspot-form'>
<script charset="utf-8" src="//js.hsforms.net/forms/current.js"></script>
@ericelliott
ericelliott / essential-javascript-links.md
Last active November 8, 2024 17:29
Essential JavaScript Links
@danbp
danbp / gist:f9c13d0b42c6e42b5545
Created April 9, 2015 01:30
BuddyPress - My Groups Widget
<?php
/*
Plugin Name: My Groups Widget
Description: This BuddyPress widget lists the groups of which the logged in user is a member.
Version: 1.0
Revision Date: March 10, 2015
Requires at least: WP 4.0, BuddyPress 2.0
Tested up to: WP 4.1.1, BuddyPress 2.2.1
License: Example: GNU General Public License 2.0 (GPL) http://www.gnu.org/licenses/gpl.html
Author: Dan