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 / 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 / Nginx RTMP module on Ubuntu 18.04.md
Last active November 22, 2023 02:29
Nginx RTMP module on Ubuntu 18.04 with RTMPS support for Facebook live streaming Hardware and Software live-streaming encoders have typically used the RTMP streaming protocol. With the Facebook enforcement of the RTMPS encrypted live-stream some older hardware and software encoders can no longer work. By using the method below we can convert RTM…

update

sudo apt-get update
sudo apt-get upgrade

install nginx

sudo apt-get install nginx -y
sudo apt-get install libnginx-mod-rtmp -y
@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 / 001 how-to.txt
Last active April 1, 2023 04:17
Setup C9 IDE in digitalocean
Requirements
Putty prefered if you are in Windows.
JuiceSSH if you choose to do all this from android phone
https://play.google.com/store/apps/details?id=com.sonelli.juicessh
A digitalocean account, if you dont have one, create one with this link
https://bit.ly/do-credit
You will get $10 credit in you digitalocean account once you spend $25 with them.
create digitalocean account, verify it.
create droplet.
@amitkhare
amitkhare / adobe_illustrator_path_batch_rename.jsx
Last active June 19, 2022 13:34
Adobe Illustrator path batch rename
#target illustrator
var docRef = app.activeDocument;
with (docRef) {
//int j = items.pathItems[0];
// layers[0].name = "Layer 1";
alert(app.activeDocument.pathItems[0].name + "");
for(var i =0; i < app.activeDocument.pathItems.length; i++) {
app.activeDocument.pathItems[i].name = pad((i+1), 3);
@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: