Skip to content

Instantly share code, notes, and snippets.

Avatar
😊
Happy

Abhishek Ghosh AbhishekGhosh

😊
Happy
View GitHub Profile
@AbhishekGhosh
AbhishekGhosh / External link icon Base64 Data URI.MD
Last active Oct 15, 2021
External link icon Base64 Data URI
View External link icon Base64 Data URI.MD
View twitter-profile-template.html
</head>
<body class="t1 logged-in user-style-AbhishekCTRL" dir="ltr">
<div id="doc" class="route-home">
<div class="topbar js-topbar">
<div id="banners" class="js-banners">
</div>
<div class="global-nav" data-section-term="top_nav">
<div class="global-nav-inner">
<div class="container">
@AbhishekGhosh
AbhishekGhosh / code.php
Last active Sep 29, 2021
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"
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 / Get Screenshot of Website.php
Created Sep 10, 2013
Get Screenshot of Website PHP Script
View Get Screenshot of Website.php
<?php
//**
//save this snippet as url_to_png.php
// usage: php url_to_png.php http://example.com
// Full credit to http://www.os-cms.net/blog/view/5/how-to-create-a-screen-dump-with-php-on-linux
// Modified by Robbie - http://www.category5.tv/
// Distributed by Dr. Abhishek Ghosh under GNU GPL 3.0
// Guessing that no one will come to bite !
// You can delete this comment part for personal usage.
@AbhishekGhosh
AbhishekGhosh / towerpro5010.cc
Last active Oct 19, 2020
Test Code for TowerPro SG 5010
View towerpro5010.cc
// coded by Dr. Abhishek Ghosh @AbhishekCTRL
// under GNU GPL 3.0
// https://thecustomizewindows.com/
// Written for testing TowerPro SG 5010 with Arduino UNO powered from USB
// yellow -> pin 9, brown -> ground/GND, red -> 5v,
#include <Servo.h>
Servo towerprosg5010;
int pos = 0;
void setup()
@AbhishekGhosh
AbhishekGhosh / http2_apache2_ubuntu16.04.md
Created Sep 5, 2020 — 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 Jun 23, 2020
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; ?>
@AbhishekGhosh
AbhishekGhosh / 5670.php
Created Jun 23, 2020
WordPress show post content example with page ID 5670
View 5670.php
<?php
$id = 5670;
$p = get_page($id);
echo apply_filters('the_content', $p->post_content);
?>
@AbhishekGhosh
AbhishekGhosh / post-content.php
Created Jun 23, 2020
Show WordPress Post Content
View post-content.php
<?php
$id = ID#;
$p = get_page($id);
echo apply_filters('the_content', $p->post_content);
?>