Skip to content

Instantly share code, notes, and snippets.

View geektutor's full-sized avatar

Sodiq Akinjobi geektutor

View GitHub Profile
@geektutor
geektutor / copyDocs.gs
Created October 11, 2024 11:59
Make a copy of a docs
//This script will allow you to make a whole lot of copies of a document in your Google Drive.
//If the original is in a folder, then the copies will be made in the same folder
function copyDocs() {
for(i=0; i<6; i++){ //change the number 30 to however many copies you want.
//open the document in Google Drive that you want to copy.
//Look at the URL, there is a string of weird letters and numbers that is the document ID
//Copy the document ID and REPLACE it in the line of code below.
//Notice there are single quotations around the document ID, that is important!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Card</title>
<link rel="stylesheet" href="card.css">
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Card</title>
<link rel="stylesheet" href="card.css">
</head>
<body>
function myFunction() {
// Get all rows in the sheet minus the first
var rows = SpreadsheetApp.getActiveSheet().getDataRange();
var data = rows.getValues();
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
for (var row = 2; row < data.length +1; row++) {
for (var col = 3; col <= data[row].length; col++) {
let cell = sheet.getRange(row, col);
let cellData = cell.getValues()[0][0];
<?php
function myprefix123_give_donations_custom_form_fields( $form_id ) {
// Only display for forms with the IDs "754" and "578";
// Remove "If" statement to display on all forms
// For a single form, use this instead:
// if ( $form_id == 754) {
$forms = array( 2034, 2030, 2027, 2023, 2018, 2015, 2006, 2003 );
if ( in_array( $form_id, $forms ) ) {
<?php /* Template Name: Contact */ ?>
<?php get_header()?>
<style>
div.wpcf7 {
margin: 0;
padding: 1.5em;
background: #fff;
border-radius: 3px;
}
@geektutor
geektutor / states-in-nigeria-cf7.php
Created October 16, 2020 12:10
WP Contact Form 7 States in Nigeria
<?php
/*
List of states in Nigeria to use with CF7
*/
?>
[select* location "Abia" "Adamawa" "Akwa Ibom" "Anambra" "Bauchi" "Bayelsa" "Benue" "Borno" "Cross River" "Delta" "Ebonyi" "Edo" "Ekiti" "Enugu" "FCT - Abuja" "Gombe" "Imo" "Jigawa" "Kaduna" "Kano" "Katsina" "Kebbi" "Kogi" "Kwara" "Lagos" "Nasarawa" "Niger" "Ogun" "Ondo" "Osun" "Oyo" "Plateau" "Rivers" "Sokoto" "Taraba" "Yobe" "Zamfara"]
@geektutor
geektutor / country-shortcode.php
Last active October 16, 2020 12:04 — forked from MatthewEppelsheimer/country-shortcode.php
WP Contact Form 7 shortcode with list of Countries
<?php
/*
List of countries to use with CF7
*/
?>
<?php
include './config/connect.php';
//i don't know what i am writing tho, i hope it works sha
$first ="UPDATE `user` SET `score` = '0' WHERE `score` > 0";
$reset = mysqli_query($conn, $first);
$sql = "SELECT email FROM user";
$result = mysqli_query($conn, $sql);
$count = mysqli_num_rows($result);
if ($count > 0) {
while($row = mysqli_fetch_assoc($result)) {
<?php
/***** Logo/Sitename *****/
if (!function_exists('mh_newsdesk_lite_logo')) {
function mh_newsdesk_lite_logo() {
$header_img = get_header_image();
$header_title = get_bloginfo('name');
$header_desc = get_bloginfo('description');
echo '<a href="' . esc_url(home_url('/')) . '" title="' . esc_attr($header_title) . '" rel="home">' . "\n";