Skip to content

Instantly share code, notes, and snippets.

Avatar
😊
Happy

Abhishek Ghosh AbhishekGhosh

😊
Happy
View GitHub Profile
@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);
?>
@AbhishekGhosh
AbhishekGhosh / home_with_div.php
Created Jun 23, 2020
Genesis Home Page with div
View home_with_div.php
<?php if(is_front_page() && !is_paged()) : ?>
<div id="pagewrap-tcw"></div>
</div>
<?php endif; ?>
@AbhishekGhosh
AbhishekGhosh / homepage.php
Created Jun 23, 2020
Show Only on Genesis Home Page
View homepage.php
<?php if(is_front_page() && !is_paged()) : ?>
<?php endif; ?>
@AbhishekGhosh
AbhishekGhosh / switch.ino
Created Feb 20, 2020
Samsung Smartwatch as Proximity Switch
View switch.ino
#include <BLEAdvertisedDevice.h>
#include <BLEDevice.h>
#include <BLEScan.h>
const int PIN = 2;
const int CUTOFF = -60;
void setup() {
pinMode(PIN, OUTPUT);
BLEDevice::init("");
@AbhishekGhosh
AbhishekGhosh / esp32.cc
Created Dec 2, 2019
Connect ESP32 Arduino With a Samsung Smart Watch
View esp32.cc
#include <WiFi.h>
#include <WebServer.h>
/* Put your SSID & Password */
const char* ssid = "ESP32"; // Enter SSID here
const char* password = "12345678"; //Enter Password here
/* Put IP Address details */
IPAddress local_ip(192,168,1,1);
IPAddress gateway(192,168,1,1);
@AbhishekGhosh
AbhishekGhosh / ads.txt
Last active Nov 3, 2019
Sample ads.txt of thecustomizewindows.com
View ads.txt
#Ads.txt thecustomizewindows.com
# edit the entries such google pub id, remove the duplicates
# own ads
google.com, pub-8996933744651682, DIRECT, f08c47fec0942fa0
google.com, pub-8996933744651682, RESELLER, f08c47fec0942fa0
developermedia.com, lqm.thecustomizewindows.site, DIRECT
developermedia.com, lqm.thecustomizewindows.site, RESELLER
View simpleDevice.py
# *****************************************************************************
# Copyright (c) 2017, 2019 IBM Corporation and other Contributors.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
# *****************************************************************************
import time
You can’t perform that action at this time.