Skip to content

Instantly share code, notes, and snippets.

Avatar
😊
Happy

Abhishek Ghosh AbhishekGhosh

😊
Happy
View GitHub Profile
View lcd-temp-humidity.ino
#include <LiquidCrystal.h>
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
#define DHTPIN A0 // 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);
LiquidCrystal lcd(7, 8, 9, 10, 11 , 12);
View ob_flush.php
<?php
/*
== ob_end_flush() ==
Flush (send) the output buffer and turn off output buffering
== ob_end_clean() ==
Clean (erase) the output buffer and turn off output buffering
== ob_get_contents() ==
@AbhishekGhosh
AbhishekGhosh / index.html
Last active Aug 22, 2017
brackets my default template
View index.html
<!DOCTYPE html>
<html>
<head>
<title>EDITED BRACKETS</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<!-- Add HTML stuffs below this -->
View gist.md

This is example.

View Adense-in-post.js
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- responsive_300x250 -->
<ins class="adsbygoogle"
style="display:block; text-align:center; width:100%;"
data-ad-client="ca-pub-xxxxxxxxxxx"
data-ad-slot="yyyyyyyyy"
data-ad-format="rectangle"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
View fail2ban.log
2017-07-17 05:41:07,224 fail2ban.server [935]: INFO rollover performed on /var/log/fail2ban.log
2017-07-17 05:41:09,042 fail2ban.filter [935]: INFO Log rotation detected for /var/log/auth.log
2017-07-17 05:41:09,543 fail2ban.filter [935]: INFO Log rotation detected for /var/log/auth.log
2017-07-17 05:41:09,562 fail2ban.filter [935]: INFO Log rotation detected for /var/log/auth.log
2017-07-17 05:46:05,824 fail2ban.actions [935]: NOTICE [sshd] Unban 97.79.239.20
2017-07-17 05:49:49,237 fail2ban.actions [935]: NOTICE [sshd] Unban 61.166.73.121
2017-07-17 06:43:41,419 fail2ban.filter [935]: INFO [sshd] Found 90.189.242.131
2017-07-17 06:43:41,423 fail2ban.filter [935]: INFO [sshd] Found 90.189.242.131
2017-07-17 06:43:44,428 fail2ban.filter [935]: INFO [sshd] Found 90.189.242.131
2017-07-17 06:43:44,790 fail2ban.actions [935]: NOTICE [sshd] Ban 90.189.242.131
View watch.ino
#define PIN_SCE 9
#define PIN_RESET 10
#define PIN_DC 12
#define PIN_SDIN 11
#define PIN_SCLK 13
#define LCD_CMD 0
#define LCD_C LOW
#define LCD_D HIGH
View CAA-adoption-notes.md
@AbhishekGhosh
AbhishekGhosh / .htaccess
Created Jun 12, 2017
WordPress, W3TC extra .htaccess
View .htaccess
### stanza for brotli starts ###
<IfModule mod_headers.c>
# Serve brotli compressed CSS files if they exist and the client accepts brotli.
RewriteCond %{HTTP:Accept-encoding} br
RewriteCond %{REQUEST_FILENAME}\.br -s
RewriteRule ^(.*)\.css $1\.css\.br [QSA]
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
RewriteCond %{HTTP:Accept-encoding} gzip
RewriteCond %{REQUEST_FILENAME}\.gz -s
@AbhishekGhosh
AbhishekGhosh / geoip.php
Created Jun 8, 2017
GEO IP TEST PHP Script
View geoip.php
<html>
<body>
<?php
$geoip_country_code = getenv(GEOIP_COUNTRY_CODE);
$geoip_country_name = getenv(GEOIP_COUNTRY_NAME);
$geoip_region = getenv(GEOIP_REGION);
$geoip_city = getenv(GEOIP_CITY);
$geoip_postal_code = getenv(GEOIP_POSTAL_CODE);
$geoip_latitude = getenv(GEOIP_LATITUDE);
You can’t perform that action at this time.