Skip to content

Instantly share code, notes, and snippets.

View AbhishekGhosh's full-sized avatar
😊
Happy

Abhishek Ghosh AbhishekGhosh

😊
Happy
View GitHub Profile
@AbhishekGhosh
AbhishekGhosh / ESP32-Web-Controlled-Servo.ino
Created July 1, 2023 09:31 — forked from elktros/ESP32-Web-Controlled-Servo.ino
Code for ESP32 Web Controlled Servo.
#include <WiFi.h>
const int servoPin = 16; /* GPIO16 */
const char* ssid = "ESP32-WiFi"; /* Add your router's SSID */
const char* password = "12345678"; /*Add the password */
int dutyCycle = 0;
//int position1 = 0;
http://rpc.pingomatic.com/
http://rpc.weblogs.com/RPC2
http://rpc.blogbuzzmachine.com/RPC2
http://rpc.aitellu.com
http://rpc.bloggerei.de/ping/
http://rpc.reader.livedoor.com/ping
http://rpc.twingly.com/
http://ping.feedburner.com
http://ping.bloggers.jp/rpc/
http://ping.myblog.jp
@AbhishekGhosh
AbhishekGhosh / chaser.ino
Created June 23, 2023 09:38
Simple LED chaser Arduino
int LED13 = 13;
int LED12 = 12;
int LED11 = 11;
int LED10 = 10;
int LED9 = 9;
int LED8 = 8;
int LED7 = 7;
int LED6 = 6;
int LED5 = 5;
int LED4 = 4;
@AbhishekGhosh
AbhishekGhosh / insert_data.php
Created June 4, 2023 17:24
Insert data in MySQL tables
<?php
$servername = "localhost";
$username = "non-root";
$password = "non-root-password";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error){
die("Connection failed: " . $conn->connect_error);
}
$sql = "INSERT INTO LED_status (id, status)
@AbhishekGhosh
AbhishekGhosh / create-table.php
Created June 4, 2023 17:16
Create MySQL Table With PHP
<?php
$servername = "localhost";
$username = "non-root";
$password = "non-root-password";
$dbname = "ESP32IoT";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
@AbhishekGhosh
AbhishekGhosh / create-database.php
Last active June 4, 2023 16:43
Create MySQL Database With PHP
<?php
$servername = "localhost";
$username = "non-root";
$password = "non-root-password";
$conn = new mysqli($servername, $username, $password);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
@AbhishekGhosh
AbhishekGhosh / msmtprc
Created May 29, 2023 17:16
msmtprc settings
# common settings
defaults
port 587
auth on
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /var/log/msmtp/msmtp.log
# outlook smtp settings
@AbhishekGhosh
AbhishekGhosh / mail.php
Created May 29, 2023 16:56
PHP mail testing script
<?php
$to = "recipient@gmail.com";
$from = "sender@hotmail.com";
$subj = "sending email using php mail() function";
$body = "This email is sent using php mail() function. This proves that your msmtp service is correctly configured with php.";
mail($to, $subj, $body);
?>
@AbhishekGhosh
AbhishekGhosh / badge.css
Created May 24, 2023 05:45
WordPress Genesis verified badge CSS
.entry-author-name:after {
content: '\f058';
font-family: FontAwesome;
font-size: 15px;
margin-left:5px;
margin-right:5px;
color:#0274be;}
@AbhishekGhosh
AbhishekGhosh / string.html
Created April 27, 2023 15:45
post-Persistence of vision in DIY Electronics
var binaryStr = "111111111111111111111111000011111111111111111111";