Skip to content

Instantly share code, notes, and snippets.

View fonziemedia's full-sized avatar
🎯
Focusing

Fonziemedia fonziemedia

🎯
Focusing
View GitHub Profile
@tomhicks
tomhicks / plink-plonk.js
Last active March 18, 2024 02:23
Listen to your web pages
@adamgiese
adamgiese / nth-child-quantity-mixins.scss
Last active April 19, 2023 11:22
Advanced nth-child mixins
@mixin valid-quantity($quantity) {
@if type-of($quantity) != 'number' {
@error 'The "quantity" parameter must be a number!';
}
@if not(unitless($quantity)) {
@error 'The "quantity" parameter must not have a unit!';
}
@if $quantity < 0 {
@error 'The "quantity" parameter must be at least 0!';
}
@mxstbr
mxstbr / Readme.md
Last active June 25, 2024 18:16
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@sabarasaba
sabarasaba / gist:3080590
Created July 10, 2012 02:19
Remove directory from remote repository after adding them to .gitignore
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@ethertank
ethertank / daes.js
Created December 25, 2011 09:57
detect audio element supported
var audioElementSupported = (function(d) {
var a = d.createElement("audio"),
o = {},
s = "audio\/";
if (typeof a.canPlayType === "function") {
o.supported = Boolean(true);
o.mp3 = a.canPlayType(s + "mpeg");
o.wav = a.canPlayType(s + 'wav; codecs="1"');
o.ogg = a.canPlayType(s + 'ogg; codecs="vorbis"');