Skip to content

Instantly share code, notes, and snippets.

View LordZombi's full-sized avatar

Zombi LordZombi

View GitHub Profile
@LordZombi
LordZombi / tricks
Created October 24, 2013 12:01
Wrong displaying on mobile | tablet ?
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<meta name="googlebot" content="index,follow,snippet,archive">
<meta name="robots" content="index,follow">
<meta name="description" content="#">
<meta name="keywords" content="#">
<meta name="author" content="#">
@LordZombi
LordZombi / animatedScrollTo.js
Created August 22, 2017 15:31 — forked from joshbeckman/animatedScrollTo.js
ScrollTo animation using pure javascript and no jquery
document.getElementsByTagName('button')[0].onclick = function () {
scrollTo(document.body, 0, 1250);
}
function scrollTo(element, to, duration) {
var start = element.scrollTop,
change = to - start,
currentTime = 0,
increment = 20;
@LordZombi
LordZombi / kebabCaseFiles.js
Last active February 21, 2023 08:15
Rename files to kebab-case (AI generated)
const fs = require('fs');
const path = require('path');
function removeAccents(str) {
return str.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
}
function kebabCase(str) {
return str
.replace(/[^\w\s-]/g, '') // Remove non-Latin characters and keep spaces and hyphens
@LordZombi
LordZombi / tabs.css
Last active March 2, 2023 15:27
Simple Vanilla.js tabs implementation
.tabs__header-tab.is-active {
// Some active styles for header
}
.tabs__content {
display: none; // Hide tab content
}
.tabs__content.is-active {
display: block; // And show only active