Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Focusing

suraj gehlot enggsuraj

💻
Focusing
View GitHub Profile
View Truncate String with ...
export function truncate(str) {
const length = 100;
const ending = "...";
if (str.length > length) {
return str.substring(0, length - ending.length) + ending;
} else {
return str;
}
}
View allDevices_mediaqueries
/* WIDTH: 1200 to 2000px */
@media only screen and (max-width: 2000px) {
}
/* WIDTH: 1024 to 1200px */
@media only screen and (max-width: 1200px) {
}
/* WIDTH: 768 to 1024px */
@media only screen and (max-width: 1024px) {
@enggsuraj
enggsuraj / localstorage.js
Last active Nov 4, 2020
Local Storage in Javascript
View localstorage.js
// USER OBJECT
const user = {
name: "blogtheorem",
ID: 123,
isCoding: true,
};
// CRUD OPERATION
//1. CREATE
@enggsuraj
enggsuraj / cssreset.css
Last active Apr 17, 2021
CSS Starting Boilerplate Reset
View cssreset.css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
text-decoration: none;
list-style: none;
}
.clearfix::after {