Skip to content

Instantly share code, notes, and snippets.

View sashuu69's full-sized avatar
🇮🇳
At Bangalore

Sashwat K sashuu69

🇮🇳
At Bangalore
View GitHub Profile
@sashuu69
sashuu69 / gist:4e2ff2d1352f58ea5fbb0ee5cda95fe2
Created October 10, 2023 17:01 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@sashuu69
sashuu69 / automatic-lights.ino
Created June 14, 2020 07:55
Automatic light according light intensity and humity using relay and store data in firebase. Microcontroller - NodeMCU, LDR sensor, DHT22 and relay
#include "DHT.h"
#include <ESP8266WiFi.h>
#include <Firebase.h>
#include <FirebaseArduino.h>
#include <FirebaseCloudMessaging.h>
#include <FirebaseError.h>
#include <FirebaseHttpClient.h>
#include <FirebaseObject.h>
#include <FirebaseArduino.h>
@sashuu69
sashuu69 / gps-alarm-clock.ino
Created March 19, 2020 15:55
GPS ALARM CLOCK
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#include <LiquidCrystal_I2C.h>
#include "SD.h"
#define SD_ChipSelectPin 10
#include "TMRpcm.h"
#include "SPI.h"
LiquidCrystal_I2C lcd(0x27,20,4); // set the LCD address to 0x27 for a 16 chars and 2 line display
TinyGPSPlus gps; // The TinyGPS++ object
#include <Wire.h> // Wire library - used for I2C communication
#include <SoftwareSerial.h>
SoftwareSerial bluetoothSerial(9, 8); // RX, TX
int ADXL345 = 0x53; // The ADXL345 sensor I2C address
float X_out, Y_out, Z_out; // Outputs
int buzzer = 12;
void setup() {
/*
* Project Name: ESP8266 and GPS module
* Author: Sashwat K
* Date & Time: 13 / 03 / 2020
* Revision: 1
*/
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
#include <ESP8266WiFi.h>
@sashuu69
sashuu69 / ultrasonicSensor.ino
Last active October 22, 2019 15:40
To get value from ultrasonic sensor
/*
* Projecr Name : IOT based water level indicator
* Project repository link : https://github.com/sashuu6/CET-MCA-S5-MiniProject-IOT_based_Water_Level_Indicator
* File name: ultrasonicSensor.ino
* Author : Sashwat K
* Created on : 22 Oct 2019
* Last updated : 22 Oct 2019
* Microcontroller: Atmega 328p
* Pins used: Ultrasonic sensor: Trigger pin - 4
* Echo pin - 5
@sashuu69
sashuu69 / index.html
Created August 10, 2018 10:23
Simple Bank UI with least use of CSS
<!DOCTYPE html>
<head>
<title>
SashBank - The secure one
</title>
</head>
<body bgcolor="black">
<font color="white">
<center>
<h1>SashBank</h1>
@sashuu69
sashuu69 / cpu_temp_test.sh
Last active May 26, 2018 17:18
A script to stress and display CPU temperature using sysbench.
#!/bin/bash
clear
#A loop to stress the system
for f in {1..10}
do
vcgencmd measure_temp
sysbench --testcpu --cpu-max-prime=20000 --num-threads=4 run >/dev/null 2>&1
done
vcgencmd measure_temp
@sashuu69
sashuu69 / post_fedora_install.sh
Last active March 2, 2019 14:11
Things to do after installing Fedora 29
#for downloading rpm and others to a specific location
echo `cd Downloads`
echo `mkdir post_fedora_install`
echo `cd post_fedora_install`
#Update Packages
echo `dnf -y update`
#Enable SSH service
echo `sudo systemctl start sshd`
echo `sudo systemctl enable sshd`
#Setup RPM Fusion Repository
@sashuu69
sashuu69 / fork.c
Created March 20, 2018 09:12
C program to implement fork
#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>
int main()
{
pid_t c,d;
int i,x;
c=fork();
d=fork();
if (c>0 && d==0)