Skip to content

Instantly share code, notes, and snippets.

View uddhabh's full-sized avatar

Uddhab Haldar uddhabh

View GitHub Profile
@kjbrum
kjbrum / wp_gravity_forms_add_empty_dropdown_option.php
Last active March 22, 2021 23:23
Add a blank option to a Gravity Forms select element.
<?php
/**
* Add a blank option to a Gravity Forms dropdown
*
* @param object $form The Gravity Form
* @return object $form The modified Gravity Form
*/
function wp_gravity_forms_add_empty_dropdown_option( $form ) {
// Select the correct form, then set the id of the field(s) we need to change
if( $form['id'] == 1 ) {
/* Enter Your Custom Functions Here */
// Add custom validation for CF7 form fields
function is_company_email($email){ // Check against list of common public email providers & return true if the email provided *doesn't* match one of them
if(
preg_match('/@gmail./i', $email) ||
preg_match('/@hotmail./i', $email) ||
preg_match('/@live./i', $email) ||
preg_match('/@msn./i', $email) ||
preg_match('/@aol./i', $email) ||
@ywwwtseng
ywwwtseng / host-react-app-on-apache-server.md
Last active July 4, 2024 19:28
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active July 19, 2024 11:40
crack activate Office on mac with license file