Skip to content

Instantly share code, notes, and snippets.

View mrmartineau's full-sized avatar
👋
Aho Young Warrior

Zander Martineau mrmartineau

👋
Aho Young Warrior
View GitHub Profile
@laurendorman
laurendorman / _cursor-mixins.scss
Last active August 8, 2019 10:49
Sass mixins + classes for cursors – For use with online photo editors, drag/drop tools, text editors and WYSIWYGs.
// Used to @include a cursor within a pre-existing class
@mixin cursor($cursor-type) {
cursor: $cursor-type;
}
// Used to generate cursor classes
@mixin cursor-class($cursor-type) {
.#{$cursor-type}-cursor { cursor: $cursor-type; }
}
@elijahmanor
elijahmanor / _snippet.html
Created February 6, 2012 04:51
Differences Between jQuery .bind() vs .live() vs .delegate() vs .on() Methods
<ul id="members" data-role="listview" data-filter="true">
<!-- ... more list items ... -->
<li>
<a href="detail.html?id=10">
<h3>John Resig</h3>
<p><strong>jQuery Core Lead</strong></p>
<p>Boston, United States</p>
</a>
</li>
<!-- ... more list items ... -->
attrTests: {
testAccept: function(_el) {
return !!(_el.accept === '') && !!(_el.accept !== 'undefined');
},
testAutocomplete: function(_el){
return !!(_el.autocomplete === '') && !!(_el.autocomplete !== 'undefined');
},
testAutofocus: function(_el){
@paulrouget
paulrouget / scratchpad.js
Created November 2, 2012 17:59
Floating scrollbars in Firefox
/**
* How to have floating scrollbars in Firefox (Linux, Windows & Mac).
* Screenshot: http://i.imgur.com/bn44L.png
* You need Firefox > 18. Just run this code in a browser-scratchpad:
*
* Ping me on Twitter (@paulrouget) if you run into problems.
*
* 1. Go to about:config - Set devtools.chrome.enabled to true
* 2. Starts Scratchpad (Shift-F4)
* 3. In Scratchpad's menubar, check "Environment > Browser"
@raucao
raucao / typekit.js
Last active February 12, 2020 06:25
Improved Typekit embed code
(function(d) {
var tkTimeout=3000;
if(window.sessionStorage){if(sessionStorage.getItem('useTypekit')==='false'){tkTimeout=0;}}
var config = {
kitId: 'a1b2c3f4',
scriptTimeout: tkTimeout
},
h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";if(window.sessionStorage){sessionStorage.setItem("useTypekit","false")}},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='//use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
})(document);
@MoOx
MoOx / react-ui-kit-comparator.md
Last active April 16, 2020 20:36
Matrix of existing React ui kit (more than 200 download/week, more than 200 stars)
@WebReflection
WebReflection / certificate.sh
Last active July 1, 2020 18:08
A basic Self Signed SSL Certificate utility
#!/usr/bin/env bash
# A basic Self Signed SSL Certificate utility
# by Andrea Giammarchi @WebReflection
# https://www.webreflection.co.uk/blog/2015/08/08/bringing-ssl-to-your-private-network
# # to make it executable and use it
# $ chmod +x certificate
# $ ./certificate # to read the how-to
@mattdesl
mattdesl / top-100-dev-dependents.txt
Last active August 23, 2020 07:30
Top 100 Dev Dependents on npmjs (as of Jul 31, 2015)
mocha 44731
chai 17944
grunt 17447
should 11882
grunt-contrib-jshint 11466
gulp 8619
istanbul 7374
tape 7313
sinon 6851
grunt-contrib-clean 6807
@carl0zen
carl0zen / styled-components-example.jsx
Last active September 2, 2020 10:23
Styled Components example
import styled from "styled-components";
import {
theme
} from "ui";
const { color, font, radius, transition } = theme;
export const Button = styled.button`
background-color: ${color.ghost};
#!/bin/sh
defaults write com.apple.finder CreateDesktop -bool false
killall Finder
osascript -e 'tell application "Terminal" to close (every window whose name contains ".command")' &
exit