Skip to content

Instantly share code, notes, and snippets.

View geektutor's full-sized avatar

Sodiq Akinjobi geektutor

View GitHub Profile
<!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";
void main() {
unique([9, 3, 6, 4, 3, 4, 5]);
unique([1, 2, 3, 3, 3, 3, 4, 5, 3, 3, 3, 3, 4, 5, 6, 6, 11, 22, 33, 44]);
}
/* An implemention of selection sort in dart. Used Python knowledge for this */
unique(List sortList) {
List end = [];
for (var i = 0; i < sortList.length; i++) {
/* Loop through the list */