Skip to content

Instantly share code, notes, and snippets.

View unwiredtech's full-sized avatar

Patrick Sarmiento unwiredtech

View GitHub Profile
/*
-----------------------
ESP8266 Monitor its Own Battery Level using IoT
-----------------------
Voltage Monitoring in Volts and Percentage
Temperate and Humidity Sensor
*/
@unwiredtech
unwiredtech / arduino-voltage-monitor-12V
Created July 4, 2022 12:48
arduino-voltage-monitor-12V
#include <ESP8266WiFi.h>
String apiKey = "DT5E8MZSXYCUBLMD";
const char* ssid = "yourssid"; // Enter your WiFi Network's SSID
const char* pass = "yourwifipassword"; // Enter your WiFi Network's Password
const char* server = "api.thingspeak.com";
int analogInPin = A0; // Analog input pin
int sensorValue; // Analog Output of Sensor
float calibration = 8.21; // Check Battery voltage using multimeter & add/subtract the value
/* Health Quiz Start */
.fmg-health-quiz_wrapper{
padding: 15px;
background:#fff;
font-family: 'Muli', sans-serif;
}
form.fmg-health-quiz .gf_progressbar_title{
/* Add Class "sticky-header" to the header element */
header.sticky-header {
--header-height: 120px;
--opacity: 1;
--shrink-me: 0.70;
--sticky-background-color: #ffffff;
--transition: .3s ease-in-out;
transition: background-color var(--transition),
background-image var(--transition),
@unwiredtech
unwiredtech / wp-extended-user-info.php
Created February 6, 2019 02:29
Wordpress Extended User Information
<?php
/* Custom user meta */
add_action( 'show_user_profile', 'extra_user_profile_fields' );
add_action( 'edit_user_profile', 'extra_user_profile_fields' );
function extra_user_profile_fields( $user ) { ?>
<h3><?php _e("Extra profile information", "blank"); ?></h3>
@unwiredtech
unwiredtech / cf-7-2-column.css
Created September 21, 2018 07:48
Contact form 7 - 2 column
.cf-wrapper{
position: relative;
}
#left-input {
width: 47%;
float: left;
margin-right:6%;
}
@unwiredtech
unwiredtech / op2-smoothscroll.js
Last active August 5, 2018 16:08
OptimizePress 2.0 Smooth Scroll
/* Optimize Press 2.0 Smooth Scroll */
/* Add this to your page-setting */
/* Anchor tag jump will be smooth */
<script>
opjq(function($) {
$('a[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
<?php
if ( ( is_user_logged_in() && $current_user->ID == $post->post_author ) ) { // Execute code if user is logged in or user is the author
acf_form_head();
wp_deregister_style( 'wp-admin' );
}
get_header();
?>
@unwiredtech
unwiredtech / taxonomy_terms.php
Created October 6, 2017 18:26
WordpressTaxonomy Terms Template
<?php // get_template_part('archive-kb'); ?>
<?php
/**
* The template for displaying Archive pages
*
* Used to display archive-type pages if nothing more specific matches a query.
* For example, puts together date-based pages if no date.php file exists.
*
@unwiredtech
unwiredtech / woocommerce-get-purchase-link.php
Created October 3, 2017 08:45
woocommerce-get-purchase-link