Skip to content

Instantly share code, notes, and snippets.

View Robokishan's full-sized avatar

Kishan Joshi Robokishan

View GitHub Profile
@futureshocked
futureshocked / ESP32_timer_interrupt_change_dureation.ino
Created July 20, 2019 05:46
ESP32 timer interrupts, how to change duration in the loop.
const byte LED_GPIO = 2;
volatile int interruptCounter; // When this is not zero, we'll take a reading from the sensor
// The interrupt service routine will increment it.
// When the sensor is read, this variable is decremented.
volatile int blinkCounter = 0;
// The hardware timer pointer
hw_timer_t * timer = NULL;
@entropiae
entropiae / Install pyenv on Ubuntu 18.04 + fish shell
Last active September 20, 2024 22:12
Install pyenv on Ubuntu 18.04 + Fish shell
Install pyenv on Ubuntu 18.04 + fish shell
- Install the packages required to compile Python
$ sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
- Download pyenv code from github
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- Define environment variable PYENV_ROOT to point to the path where pyenv repo is cloned
$ echo "set --export PYENV_ROOT $HOME/.pyenv" > ~/.config/fish/conf.d/pyenv.fish
@rambabusaravanan
rambabusaravanan / detect-js-framework.js
Last active September 14, 2024 03:06
Detect JS Framework used in a Website
// Paste these lines into website's console (Win/Linux: Ctrl + Shift + I / Mac: Cmd + Alt + I)
if(!!window.React ||
!!document.querySelector('[data-reactroot], [data-reactid]') ||
Array.from(document.querySelectorAll('*')).some(e => e._reactRootContainer !== undefined || Object.keys(e).some(k => k.startsWith('__reactContainer')))
)
console.log('React.js');
if(!!document.querySelector('script[id=__NEXT_DATA__]'))
console.log('Next.js');
@laterbreh
laterbreh / Express 4 and Socket.io: Passing socket.io to routes - app.js
Last active August 15, 2023 13:58
Express 4 and Socket.io: Passing socket.io to routes.
var app = express();
app.io = require('socket.io')();
var routes = require('./routes/index')(app.io);
app.use('/', routes);