Skip to content

Instantly share code, notes, and snippets.

const functionA = async () => {
try {
// request something that resolves in a promise
} catch (error) {
throw new Error("Function A failed");
}
}
const functionB = async () => {
try {
please, add -webkit-overflow-scrolling: touch; to the #overlay element.
And add please this javascript code at the end of the body tag:
(function () {
var _overlay = document.getElementById('overlay');
var _clientY = null; // remember Y position on touch start
_overlay.addEventListener('touchstart', function (event) {
if (event.targetTouches.length === 1) {
@gleenk
gleenk / move_wordpress.sql
Created October 4, 2013 13:16
Trasferire Dominio WP Query DB
UPDATE wp_options SET option_value = replace(option_value, 'http://www.vecchiosito.com', 'http://www.nuovosito.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.vecchiosito.com','http://www.nuovosito.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.vecchiosito.com', 'http://www.nuovosito.com');
@gleenk
gleenk / text-indent.css
Created October 4, 2013 08:17
New text-indent -9999px
#replace
{
/* Non va su windows phone */
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
@gleenk
gleenk / index
Created July 15, 2013 15:37
Horizontal Vertical Centering Header
<header>
<div><h1>Titolo del sito fighissimo yeah </h1></div>
<nav>
<ul>
<li>olè olè</li>
<li>olè olè</li>
<li>olè olè</li>
<li>olè</li>
</ul>
</nav>
@gleenk
gleenk / Responsive Circles
Created June 28, 2013 11:53
Cerchi Responsive / Fluidi con percentuali
.circle {
width: 20%;
height: 0;
padding-bottom: 20%;
background:#f90;
margin:2%;
float:left;
border-radius:50%;
}
.inner {