Skip to content

Instantly share code, notes, and snippets.

View swarad07's full-sized avatar
💻
Working from home

Swarad swarad07

💻
Working from home
View GitHub Profile
apt update && apt upgrade -y
// Add a new source
sudo nano /etc/apt/sources.list
deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main
apt update
// Install PHP 8.2
apt install php8.2 php8.2-cli php8.2-common php8.2-mysql php8.2-curl php8.2-gd php8.2-mbstring php8.2-xml php8.2-zip php8.2-opcache php8.2-imagick unzip -y
@swarad07
swarad07 / reset.css
Last active September 4, 2024 16:42
Modern CSS Reset
/* Makes sizing intuative */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default spacing */
/* Force styling of type through styling, rather than elements */
-
type: package
source:
path: config/sitestudio_sync/pack_uikit_with_helpers
options:
extra-validation: false
-
type: package
source:
path: config/sitestudio_sync/pack_colors
@swarad07
swarad07 / blur-images.js
Last active June 3, 2021 09:40
Blur the images on the screen when working in public place.
/**
* Blur the images on the webpage
* blur-images.js From: Swarad Mokal (https://github.com/swarad07)
*/
// Steps
// 1. Open Console
// 2. Go to Sources > Snippets > New Snippet
// 3. Copy paste this file's content and save the snippet > CMD + S. (Optionally, rename the snippet)
// 4. Whenever needed just Run the snippet on the webpage.
@swarad07
swarad07 / detect-position-sticky.html
Created September 19, 2020 15:16
detect-position-sticky
<!-- HTML -->
<div id="nav-container">This will get unsticky scroll </div>
<div id="nav-container-bottom"></div>
<!-- CSS -->
// 1px tracker.
#nav-container-bottom {
min-height: 1px;
min-width: 1px;
}
@swarad07
swarad07 / position-sticky-2
Created September 19, 2020 14:50
position-sticky-2
.selector {
position: sticky;
// This can be any position you want the selector to stick to.
// Use left, right, bottom as well.
top: 0;
}
@swarad07
swarad07 / position-sticky-gist-1.css
Created September 19, 2020 14:16
position sticky - gist 1
.selector {
position: fixed;
// This can be any position you want the selector to stick to.
// Use left, right, bottom as well.
top: 0;
}
@swarad07
swarad07 / iterm.palenight.itermcolors
Created November 27, 2019 12:50
Iterm2 Palenight Material color
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.24313725531101227</real>
@swarad07
swarad07 / cloudSettings
Created November 25, 2019 05:48
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-11-25T05:49:00.836Z","extensionVersion":"v3.4.3"}
@supports not (-webkit-appearance: -apple-pay-button) {
.apple-pay-button-with-text {
display: none;
}
}