Skip to content

Instantly share code, notes, and snippets.

😍
Focusing

Abhishek Ghosh AbhishekGhosh

😍
Focusing
Block or report user

Report or block AbhishekGhosh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AbhishekGhosh
AbhishekGhosh / esp32.cc
Created Dec 2, 2019
Connect ESP32 Arduino With a Samsung Smart Watch
View esp32.cc
#include <WiFi.h>
#include <WebServer.h>
/* Put your SSID & Password */
const char* ssid = "ESP32"; // Enter SSID here
const char* password = "12345678"; //Enter Password here
/* Put IP Address details */
IPAddress local_ip(192,168,1,1);
IPAddress gateway(192,168,1,1);
@AbhishekGhosh
AbhishekGhosh / ads.txt
Last active Nov 3, 2019
Sample ads.txt of thecustomizewindows.com
View ads.txt
#Ads.txt thecustomizewindows.com
# edit the entries such google pub id, remove the duplicates
# own ads
google.com, pub-8996933744651682, DIRECT, f08c47fec0942fa0
google.com, pub-8996933744651682, RESELLER, f08c47fec0942fa0
developermedia.com, lqm.thecustomizewindows.site, DIRECT
developermedia.com, lqm.thecustomizewindows.site, RESELLER
View simpleDevice.py
# *****************************************************************************
# Copyright (c) 2017, 2019 IBM Corporation and other Contributors.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
# *****************************************************************************
import time
@AbhishekGhosh
AbhishekGhosh / xtrabackup_full_increment_restore.sh
Created Oct 6, 2019 — forked from SQLadmin/xtrabackup_full_increment_restore.sh
Automate xtrabackup for FULL/Incremental and restore
View xtrabackup_full_increment_restore.sh
#!/bin/bash
# This is my production backup script.
# https://sqlgossip.com
set -e
set -u
usage() {
echo "usage: $(basename $0) [option]"
echo "option=full: Perform Full Backup"
@AbhishekGhosh
AbhishekGhosh / flow.json
Created Apr 13, 2019
Node-RED push button message
View flow.json
[{"id":"c9dcfc2e.443d2","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"ee785b7c.381828","type":"ibmiot in","z":"c9dcfc2e.443d2","authentication":"boundService","apiKey":"","inputType":"evt","logicalInterface":"","ruleId":"","deviceId":"ESP32","applicationId":"","deviceType":"DevBoard","eventType":"sta","commandType":"","format":"json","name":"IBM IoT","service":"registered","allDevices":"","allApplications":"","allDeviceTypes":false,"allLogicalInterfaces":"","allEvents":true,"allCommands":"","allFormats":"","qos":0,"x":100,"y":180,"wires":[["6c1ca6a2.611eb8","d71d6abb.0979e8"]]},{"id":"ffad7349.104be","type":"e-mail","z":"c9dcfc2e.443d2","server":"smtp.gmail.com","port":"465","secure":true,"name":"nobody@gmail.com","dname":"","x":520,"y":240,"wires":[],"inputLabels":["IBM IoT"]},{"id":"6c1ca6a2.611eb8","type":"debug","z":"c9dcfc2e.443d2","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":530,"y":100,"wires":[]},{"id":"d71d6abb.0979e8","type":"c
@AbhishekGhosh
AbhishekGhosh / dht11.ino
Created Mar 17, 2019
ESP32 DHT11 (Adafruit library)
View dht11.ino
// copyright thecustomizewindows.com ; abhishek ghosh
// add <Adafruit_Sensor.h>, <DHT.h> and <DHT_U.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
#define DHTPIN 15 // Pin which is connected to the DHT sensor.
// type the model of sensor in use, we are using DHT 11, if you are using DHT 21 or DHT 22 change it
#define DHTTYPE DHT11
DHT_Unified dht(DHTPIN, DHTTYPE);
@AbhishekGhosh
AbhishekGhosh / snippet.php
Created Aug 22, 2018
Fat Free Social Share WordPress
View snippet.php
<div class="dev-share-buttons">
<a class="button full facebook" href="https://www.facebook.com/sharer/sharer.php?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>" target="_blank" rel="nofollow"> Facebook</a>
<a class="button full twitter" href="https://twitter.com/share?text=<?php the_title(); ?>&url=<?php the_permalink(); ?>&via=AbhishekCTRL" target="_blank" rel="nofollow"> Twitter</a>
<a class="button full google" href="https://plus.google.com/share?url=<?php the_permalink(); ?>" onclick="javascript:window.open(this.href,
'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;" target="_blank" rel="nofollow"> Google+</a>
<a class="button full pinterest" href="https://pinterest.com/pin/create/button/?url=<?php the_permalink(); ?>&media=<?php
$args = array(
'numberposts' => 1,
'order'=> 'DESC',
'post_mime_type' => 'image',
@AbhishekGhosh
AbhishekGhosh / UPDATE.sql
Created Jun 19, 2018
WordPress role restore
View UPDATE.sql
UPDATE `wp_options` SET option_value='a:1:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:54:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;s:17:"edit_others_pages";b:1;s:20:"edit_published_pages";b:1;s:13:"publish_pages";b:1;s:12:"delete_pages";b:1;s:19:"delete_others_pages";b:1;s:22:"delete_published_pages";b:1;s:12:"delete_posts";b:1;s:19:"delete_others_posts";b:1;s:2
@AbhishekGhosh
AbhishekGhosh / stripped.ipynb
Last active Jun 1, 2018
Example stripped off notebook
View stripped.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Table.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.