Skip to content

Instantly share code, notes, and snippets.

View Mr-Kumar-Abhishek's full-sized avatar

Abhishek Kumar Mr-Kumar-Abhishek

View GitHub Profile
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / apache-reverse-proxy-docker.conf
Created November 7, 2023 23:36 — forked from felipefernandes/apache-reverse-proxy-docker.conf
Apache Reverse Proxy Setup for Docker Containers
<VirtualHost *:80>
ProxyPreserveHost On
ProxyRequests Off
ServerName <<<SITE NAME>>>.com
ProxyPass / http://0.0.0.0:8080/ # Server IP + the exposed port of docker container
ProxyPassReverse / http://0.0.0.0:8080/ # Server IP + the exposed port of docker container
</VirtualHost>
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / theme.html
Created October 23, 2023 18:10
Tumblr content block fix
<style>
.community-label-cover__wrapper {display: none!important;}
.tmblr-iframe--follow-teaser {display: none!important;}
</style>
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / fix-errors-tomcat-netbeans-ubuntu.md
Created March 27, 2023 11:02 — forked from alexislucena/fix-errors-tomcat-netbeans-ubuntu.md
Fix access errors to Tomcat in NetBeans and Ubuntu

The CATALINA_BASE cant't be read / The <CATALINA_HOME>/conf/server.xml can't be read

$ sudo chown -R USERNAME /var/lib/tomcat8
$ sudo chown -R USERNAME /usr/share/tomcat8
$ sudo chown -R USERNAME /etc/tomcat8
$ sudo chown -R USERNAME /var/log/tomcat8
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / isochronic-tone.js
Created January 22, 2023 05:29
isochronic-tone.js
// Create an audio context
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
// Create an oscillator node
const oscillator = audioCtx.createOscillator();
// Set the frequency of the oscillator
oscillator.frequency.value = 1000;
// Create a gain node
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / aphanumeric-json-obj.js
Created January 21, 2023 19:10
to create aplhanumberic ids in json object
const fs = require('fs');
// Read JSON file
const jsonData = JSON.parse(fs.readFileSync('data.json', 'utf-8'));
// Function to generate unique ID
function generateID() {
return Math.random().toString(36).substr(2, 9);
}
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / Isochrone.js
Last active December 8, 2022 22:03
Isochronic tone with js from chatGPT
// Set the initial frequency of the oscillator
oscillator.frequency.value = 10;
// Create a setInterval that will update the oscillator's frequency
// every 100 milliseconds
const interval = setInterval(() => {
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / git-vim.sh
Created May 6, 2022 02:01
make vim default editor of git
$ git config --global core.editor "vim"
sass --watch input.scss output.css
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / cordova.sh
Last active April 30, 2022 10:35
.bashrc export variables for cordova
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
export ANDROID_HOME="$HOME/Android/Sdk"
export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools/
export PATH=$PATH:$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/
export PATH=$PATH:$ANDROID_SDK_ROOT/emulator/
export PATH=$PATH:$ANDROID_SDK_ROOT/platforms/
export PATH=$PATH:/opt/gradle/gradle-7.4.2/bin
@Mr-Kumar-Abhishek
Mr-Kumar-Abhishek / sw.js
Created April 29, 2022 04:15
workbox download no CDN
importScripts('/third_party/workbox-vX.Y.Z/workbox-sw.js');
workbox.setConfig({
modulePathPrefix: '/third_party/workbox-vX.Y.Z/',
});