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 / water_level.ino
Created March 25, 2024 18:56
water_level.ino
#include <Wire.h>
#include <VL53L0X.h>
#include <WiFi.h>
#include <HTTPClient.h>
const char* ssid = "YourWiFiSSID";
const char* password = "YourWiFiPassword";
const char* serverAddress = "http://yourserver.com/store_data.php";
VL53L0X sensor;
@AbhishekGhosh
AbhishekGhosh / index.html
Created March 25, 2024 18:55
index.html
<!DOCTYPE html>
<html>
<head>
<title>Water Tank Level Monitoring</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
// Function to fetch water level data
function fetchWaterLevel() {
$.ajax({
@AbhishekGhosh
AbhishekGhosh / get_data.php
Created March 25, 2024 18:54
get_data.php
<?php
$servername = "localhost";
$username = "your_username";
$password = "your_password";
$dbname = "your_database";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
@AbhishekGhosh
AbhishekGhosh / store_data.php
Created March 25, 2024 18:53
store_data.php
<?php
$servername = "localhost";
$username = "your_username";
$password = "your_password";
$dbname = "your_database";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
@AbhishekGhosh
AbhishekGhosh / Hardening-Linux-kernel-nginx
Created March 7, 2014 07:45
Hardening Linux kernel for nginx
# Avoid a smurf attack
net.ipv4.icmp_echo_ignore_broadcasts = 1
# Turn on protection for bad icmp error messages
net.ipv4.icmp_ignore_bogus_error_responses = 1
# Turn on syncookies for SYN flood attack protection
net.ipv4.tcp_syncookies = 1
# Turn on and log spoofed, source routed, and redirect packets
@AbhishekGhosh
AbhishekGhosh / clock.ino
Created February 14, 2017 23:13
Arduino 7 Segment 4 Digit clock
#include <Wire.h>
#include "TM1637.h" // http://www.seeedstudio.com/wiki/File:DigitalTube.zip
// 7сигментный индикатор
#define CLK 6
#define DIO 7
#define brightness 6 // яркость, от 0 до 7
// кнопки
#define keyHor 5
@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 / India-DNS-Server-List.txt
Created August 22, 2015 09:15
India DNS Server List
Mumbai 202.54.1.30 202.54.1.18
Mumbai 202.54.1.30 202.54.1.1
Mumbai 202.54.1.30 202.54.4.24
Mumbai 202.54.1.30 202.54.4.116
Mumbai 202.54.1.30 202.54.1.70
Mumbai 202.54.1.30 202.54.4.38
Mumbai 202.54.14.4 202.54.1.30
Mumbai 202.54.4.125 202.54.1.30
Delhi 202.54.1.30 202.54.15.1