Skip to content

Instantly share code, notes, and snippets.

View dewwripper's full-sized avatar
🏠
Working from home

Khanh CM dewwripper

🏠
Working from home
View GitHub Profile
@dewwripper
dewwripper / slugify.js
Created September 25, 2022 15:00 — forked from codeguy/slugify.js
Create slug from string in Javascript
function string_to_slug (str) {
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) {
str = str.replace(new RegExp(from.charAt(i), 'g'), to.charAt(i));
}
@dewwripper
dewwripper / media-query.css
Last active September 10, 2022 03:33 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
@media (min-width: 2561px) {
}
@media (min-width: 1921px) and (max-width: 2560px) {
}
@media (min-width: 1681px) and (max-width: 1920px) {
}
@media (min-width: 1367px) and (max-width: 1680px) {