Skip to content

Instantly share code, notes, and snippets.

View amitkhare's full-sized avatar
🤔
Brainstorming

Amit Kumar Khare amitkhare

🤔
Brainstorming
View GitHub Profile
@amitkhare
amitkhare / 000-main.css
Last active October 16, 2023 09:22
Pico CSS + Bootstrap Grid System
@import './reset.css';
/* @import url('@picocss/pico'); */
@import url('./bootstrap-4-utilities.min');
@import url('./pico-bootstrap-grid.min.css');
/* Pink Light scheme (Default) */
/* Can be forced with data-theme="light" */
[data-theme="light"],
:root:not([data-theme="dark"]) {
--background-color: #fffdef;
@amitkhare
amitkhare / Hide YouTube player overlays while fullscreen.
Last active August 25, 2023 16:11
Add these in -- Ublock Origin - My Filters
youtube.com###movie_player > div.ytp-gradient-top
youtube.com###movie_player > div.ytp-chrome-top
youtube.com###movie_player > div.ytp-gradient-bottom
youtube.com###movie_player > div.ytp-chrome-bottom
@amitkhare
amitkhare / expand-dietpi-step-1.sh
Created August 14, 2023 14:20
Expand DietPi SD CARD
#!/bin/bash
#Stop Services
/DietPi/dietpi/dietpi-services stop
#Resize partition
cat << _EOF_ | fdisk /dev/mmcblk0
p
d
2
n
@amitkhare
amitkhare / myuser.service
Last active August 12, 2023 12:27
Systemd Service as USER start at Boot
[Unit]
Description=Service Description
After=network.target
[Service]
Type=simple
ExecStartPre=/bin/sleep <TIME-IN-SECONDS>
User=<USER>
@amitkhare
amitkhare / photopea.remove.ads.js
Created June 22, 2022 09:26
Google Chrome -> DevTools -> Sources ➜ Snippets ➜ create a New snippet
const style = document.createElement('style');
style.textContent = '.app > div:not(:first-child) { visibility: hidden; }';
document.head.appendChild(style);
function addCustomEvent() {
const ADS_WIDTH = 320;
document.addEventListener('resizecanvas', (e) => {
// push the ads container outside of the viewport
window.innerWidth = document.documentElement.clientWidth + ADS_WIDTH;
});
@amitkhare
amitkhare / Gargoyle - USB Teather via Android.md
Last active June 19, 2022 13:24
Gargoyle - USB Teather via Android

Gargoyle - USB Teather via Android

Step 1:

Started with a fresh clean install of Gargoyle 1.13.x on the Netgear WNDR3700v4 router. This software image already includes USB basic support.

Step 2:

SSH into the router and installed tethering packages by issuing these commands at the command line prompt:

@amitkhare
amitkhare / code-server.service
Last active March 14, 2024 17:45
Code-Server behind Apache2 Proxy with Letsencrypt SSL
#Located in :::: /lib/systemd/system/code-server.service
[Unit]
Description=code-server
After=network.target
[Service]
Type=simple
@amitkhare
amitkhare / c9start.sh
Created February 24, 2021 05:24
updated cloud9 code start script
#!/bin/bash
dirbase="/var/www/"
# cd $dirbase
read -p "Current Directory as base? (y/N) " isCurrDir
if [ "$isCurrDir" = "Y" ] || [ "$isCurrDir" = "y" ]; then
dirpath=$(pwd)
@amitkhare
amitkhare / scrcpy-open-tcpip.bat
Created February 23, 2021 13:30
opens scrcpy in WiFi mode. node - mobile needs to be connected through USB at first.
@echo off
adb.exe kill-server
netsh wlan show interfaces | Findstr /c:"Signal" && set "CStatus=true" || set "CStatus=false"
for /f "tokens=2,3 delims={,}" %%a in ('"WMIC NICConfig where IPEnabled="True" get DefaultIPGateway /value | find "I" "') do set "location=%%a"
set location=%location:"=%
@amitkhare
amitkhare / open-mobile-hotspot-ftp-folder.bat
Created February 23, 2021 13:28
Opens ftp folder if PC is connected through mobile hotspot and there is an FTP server running on it at port 2221
@echo off
netsh wlan show interfaces | Findstr /c:"Signal" && set "CStatus=true" || set "CStatus=false"
for /f "tokens=2,3 delims={,}" %%a in ('"WMIC NICConfig where IPEnabled="True" get DefaultIPGateway /value | find "I" "') do set "location=%%a"
set location=%location:"=%
echo opening explorer at %location%
IF /i "%CStatus%"=="true" explorer.exe ftp://%location%:2221