Skip to content

Instantly share code, notes, and snippets.

@remitbri
remitbri / noHighlightColorOnTap.css
Created September 8, 2014 16:32
Disables / overrides the highlight color shown when the user taps a link or a JavaScript clickable element in Safari on iPhone.
selector,
selector:hover,
selector:active,
selector:focus{
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
@remitbri
remitbri / phoneNumberTextNotLink.html
Last active August 29, 2015 14:06
Disables automatic detection of possible phone numbers in a webpage in Safari on iOS
console.log('Captain\'s Log 1', new Date());
console.info('Ammo supplies moderate');
console.debug('Shield\'s are up');
console.warn('Unidentified craft appearing');
console.error('Fire in the cargo bay');Run
console.assert(false, 'Not true'); // say 'Not True' only if 1st param === false
console.group('My group');
// …
@remitbri
remitbri / JSON - from console to clipboard.js
Created August 5, 2013 19:06
nifty formatted JSON to your clipboard (via @ryanseddon)
copy(JSON.stringify(data, null, 2))
@remitbri
remitbri / KOKEN - essays-categories-list.html
Last active November 23, 2021 14:26
The aim is to list all the essays for all the categories an essay belongs to, in the context of essay.lens in a koken.me project. As of Koken v0.7.1, the solution https://gist.github.com/bradleyboy/0b4c335141bb2d22634f crashes the page. So, instead, manually, the solution below (rinse and repeat for all the categories of your project)…
<koken:categories>
<koken:loop>
<koken:if data="category.id" equals="1">
Also in <strong>{{ category.title }}</strong>
<ul>
<koken:load source="essays" filter:category="1">
<koken:loop>
<li>
<koken:link>
{{ essay.title }}
@remitbri
remitbri / dabblet.css
Created March 21, 2012 12:32
justify in xhtml
/**
* justify in xhtml
*/
body{background: #f06; background: linear-gradient(45deg, #f06, yellow); min-height: 100%;}
p{width:85%; margin:50px auto; padding:.5em; text-align:justify; background:white; font-size:1%;}
p>*{font-size:10000;}
p:after{content:""; display:inline-block; width:100%;
font:0/0 a; margin-top:-100%; line-height:0; height:0; padding:0;}
@remitbri
remitbri / JS - unicode char to hex value.js
Last active September 30, 2015 20:57
JS - unicode char to hex value (♥ ↔ \2665)
"♥".charCodeAt(0).toString(16)
@remitbri
remitbri / JS - strike letters & digits in a text.js
Last active September 30, 2015 20:57
JS - to strike letters & digits in a text
textToBeStriked.replace(/[a-zA-Z0-9À-ÿ]/g, "$&\u0336")