Skip to content

Instantly share code, notes, and snippets.

Yoav Weiss yoavweiss

Block or report user

Report or block yoavweiss

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@yoavweiss
yoavweiss / Remap_esc_key.sh
Created Oct 7, 2018
Remap § to Esc and Esc to F24
View Remap_esc_key.sh
#!/bin/bash
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000029}, {"HIDKeyboardModifierMappingSrc":0x700000029,"HIDKeyboardModifierMappingDst":0x700000073}]}'
@yoavweiss
yoavweiss / preload_feature_detection.js
Last active May 3, 2018
Preload feature detection
View preload_feature_detection.js
var DOMTokenListSupports = function(tokenList, token) {
if (!tokenList || !tokenList.supports) {
return;
}
try {
return tokenList.supports(token);
} catch (e) {
if (e instanceof TypeError) {
console.log("The DOMTokenList doesn't have a supported tokens list");
} else {
@yoavweiss
yoavweiss / domtokenlist_feature_detection.js
Last active Aug 13, 2018
DOMTokenList supports() example
View domtokenlist_feature_detection.js
var DOMTokenListSupports = function(tokenList, token) {
if (!tokenList || !tokenList.supports) {
return;
}
try {
return tokenList.supports(token);
} catch (e) {
if (e instanceof TypeError) {
console.log("The DOMTokenList doesn't have a supported tokens list");
} else {
View gist:801c631032c8027fe8a0
<picture>
<source srcset="http://placehold.it/300.png">
<img src="http://placehold.it/100.png" id=bla>
</picture>
<script>
(function() {
var img = document.getElementById("bla");
img.parentNode.removeChild(img);
})();
</script>
@yoavweiss
yoavweiss / gist:2b6a5fdb991be72a1f79
Created Dec 3, 2015
DOMTokenList feature detection
View gist:2b6a5fdb991be72a1f79
var tokenListSupports = function(tokenList, token) {
if (!tokenList || !tokenList.supports) {
return false;
}
try {
return tokenList.supports(token);
} catch (e) {
if (e instanceof TypeError) {
console.log("The DOMTokenList doesn't have a supported tokens list");
} else {
@yoavweiss
yoavweiss / dabblet.css
Last active Aug 29, 2015 — forked from LeaVerou/dabblet.css
Media query to detect full screen mode!
View dabblet.css
/**
* Media query to detect full screen mode!
* Y U NO WORK Chrome??
* Firefox, you’re lovely.
*/
body {
background: red;
font: bold 400% Helvetica Neue, sans-serif;
color: white;
@yoavweiss
yoavweiss / gist:cc867d5e63c1132c6cd3
Last active Oct 6, 2015
Responsive images links
View gist:cc867d5e63c1132c6cd3

Official RICG Web sites

Articles explaining the various use-cases and solutions:

View gist:10023162
TestCase testCases[] = {
24 {"screen", 300},
25 {"(min-width:500px)", 300},
26 {"(min-width:500px) 200px", 200},
27 {"(min-width:500px) 200px, 400px", 200},
28 {"(min-width:5000px) 200px, 400px", 400},
29 {"(blalbadfsdf) 200px, 400px", 400},
30 {0, 0} // Do not remove the terminator line.
31 };
@yoavweiss
yoavweiss / gist:5793495
Created Jun 16, 2013
Responsive Web sites from @rwd's twitter stream
View gist:5793495
http://responsivedesignworkflow.com/
https://www.rijksmuseum.nl/en/explore-the-collection/subjects/owls
http://www.julianabicycles.com/
http://metaframe.elliance.com/
http://purecss.io/
http://hellogeri.com/
http://2012.dconstruct.org/
http://www.moneydesktop.com/
http://thepaintdrop.com/
http://www.npr.org/blogs/thisisnpr/2013/05/08/180363048/see-a-new-npr-homepage-on-your-smartphone
@yoavweiss
yoavweiss / Sites using picturefill
Created May 12, 2013
Sites using picturefill to implement art-direction
View Sites using picturefill
alistapart.com
animoto.com
behance.net
cato.org
ceskatelevize.cz
creativemarket.com
dribbble.com
evernote.com
extra.cz
flavorwire.com
You can’t perform that action at this time.