Skip to content

Instantly share code, notes, and snippets.

View rakeshtembhurne's full-sized avatar
😉
Writing a Book

Rakesh Tembhurne rakeshtembhurne

😉
Writing a Book
View GitHub Profile
@rakeshtembhurne
rakeshtembhurne / dailyOi.js
Created February 24, 2020 13:50
Extracts daily OI information of NIFTY and BANKNIFTY
const csv = require("csvtojson");
const _ = require('lodash');
const logD = data => {
console.log(data);
process.exit();
}
const args = process.argv.slice(2);
if (args.length !== 1 || !args[0]) {
{
"explore_tabs": [
{
"tab_id": "home_tab",
"tab_name": "homes",
"pagination_metadata": {
"has_next_page": true,
"items_offset": 18,
"section_offset": 5,
"search_session_id": "c20a7c71-74be-42e9-843f-927a4dafd9da",
function isChatMessage(message) {
if (message.__x_isSentByMe) {
return false;
}
if (message.__x_isNotification) {
return false;
}
if (!message.__x_isUserCreatedType) {
return false;
}
@rakeshtembhurne
rakeshtembhurne / format_usb_or_sdcard_on_mac.sh
Created June 24, 2018 07:18
Formatting USB or SD Card on Mac
diskutil list
diskutil unmountDisk /dev/disk3
diskutil eraseDisk FAT32 NAME_OF_DISK MBRFormat /dev/disk3
sudo dd if=my_img_or_iso_file.img of=/dev/disk3 bs=1m
diskutil unmountDisk /dev/disk3
diskutil eject /dev/disk3
@rakeshtembhurne
rakeshtembhurne / grub_efi_loader.sh
Last active September 15, 2025 03:53
Reinstall the GRUB boot loader to your Ubuntu installation in EFI mode this way (From live CD)
sudo mount /dev/sdXXX /mnt
sudo mount /dev/sdXX /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
grub-install /dev/sdX
update-grub
# Note : sdX = disk | sdXX = efi partition | sdXXX = system partition
# 'Fixed' by replacing /boot/efi/EFI/Microsoft/Boot/bootmgfw.efi with /boot/efi/EFI/arch/grubx64.efi
@rakeshtembhurne
rakeshtembhurne / RemovePWA.js
Created May 18, 2018 06:29
PWA: Removes Cached Progressive web app from broser
navigator.serviceWorker.getRegistrations().then(function(registrations) {
for(let registration of registrations) {
registration.unregister()
} })
function logColor(color, args) {
console.log(`%c ${args.join(' ')}`, `color: ${color}`);
}
const log = {
aliceblue: (...args) => { logColor('aliceblue', args)},
antiquewhite: (...args) => { logColor('antiquewhite', args)},
aqua: (...args) => { logColor('aqua', args)},
aquamarine: (...args) => { logColor('aquamarine', args)},
azure: (...args) => { logColor('azure', args)},
@rakeshtembhurne
rakeshtembhurne / default nginx configuration file
Created March 21, 2018 04:10 — forked from skbr1234/default nginx configuration file
The default nginx configuration file inside /etc/nginx/sites-available/default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#

#Setting up Nginx on Your Local System ###by Keith Rosenberg

##Step 1 - Homebrew The first thing to do, if you're on a Mac, is to install homebrew from http://mxcl.github.io/homebrew/

The command to type into terminal to install homebrew is:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"