Skip to content

Instantly share code, notes, and snippets.

Avatar
😊
Happy

Abhishek Ghosh AbhishekGhosh

😊
Happy
View GitHub Profile
@AbhishekGhosh
AbhishekGhosh / badge.css
Created May 24, 2023 05:45
WordPress Genesis verified badge CSS
View 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
View string.html
var binaryStr = "111111111111111111111111000011111111111111111111";
@AbhishekGhosh
AbhishekGhosh / thecuspersistence-of-vision-in-diy-electronics.html
Created April 27, 2023 15:43
persistence-of-vision-in-diy-electronics
View thecuspersistence-of-vision-in-diy-electronics.html
B111111111111111111111111000011111111111111111111
View php info
<?php phpinfo(); ?>
@AbhishekGhosh
AbhishekGhosh / mariadb.cnf
Created April 13, 2023 18:57
MariaDB 16GB Dedicated Server
View mariadb.cnf
# The MariaDB configuration file
# File location /etc/mysql/mariadb.cnf
# Tweak suggested by Abhishek Ghosh, thecustomizewindows.com
# for 16GB dedicated server running Apache2, PHP for WordPress single site
# Test with Major Hayden's MySQL Tuner
# https://github.com/major/MySQLTuner-perl
#
[mysqld_safe]
nice = -15
@AbhishekGhosh
AbhishekGhosh / login.sh
Created August 27, 2022 19:42
Bash Script for SSH Login
View login.sh
#!/usr/bin/expect
set USER [lindex $argv 0]
set HOST [lindex $argv 1]
set PWD [lindex $argv 2]
log_file /var/log/ssh_tmp.log
set timeout 30
log_user 1
set send_slow {1 .01}
send_log "Connecting to $HOST using $USER user\n"
@AbhishekGhosh
AbhishekGhosh / code.php
Last active September 29, 2021 18:41
Ad Invalid Click Protector code
View code.php
// Install https://wordpress.org/plugins/ad-invalid-click-protector/
<?php
if( aicp_can_see_ads() ) {
// This part will show ads to your non-banned visitors
$adCode = '<div class="aicp">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- responsive_box -->
<ins class="adsbygoogle right-floating-ad"
@AbhishekGhosh
AbhishekGhosh / doorbell.ino
Created March 23, 2021 15:53
Smart doorbell
View doorbell.ino
// connects once upon pressing ESP32 boot pushbutton (GPIO 0) button and sends a message, closes connection
// written by Dr. Abhishek Ghosh, https://thecustomizewindows.com
// released under GNU GPL 3.0
const byte BUTTON=18; // boot button pin (built-in on ESP32)
const byte LED=2; // onboard LED (built-in on ESP32)
#include <WiFi.h>
@AbhishekGhosh
AbhishekGhosh / http2_apache2_ubuntu16.04.md
Created September 5, 2020 19:18 — forked from GAS85/http2_apache2_ubuntu16.04.md
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04
View http2_apache2_ubuntu16.04.md

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 16.04 running Apache 2.4.xx.
  • For Ubuntu 18.04 please read here --> https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.
@AbhishekGhosh
AbhishekGhosh / genesis_before_content_sidebar_wrap.php
Created June 23, 2020 18:03
Genesis custom homepage content via genesis_before_content_sidebar_wrap Hook
View genesis_before_content_sidebar_wrap.php
<?php if(is_front_page() && !is_paged()) : ?>
<div id="pagewrap-tcw">
<?php
$id = 5670;
$p = get_page($id);
echo apply_filters('the_content', $p->post_content);
?>
</div>
<?php endif; ?>