Skip to content

Instantly share code, notes, and snippets.

@mariakat
mariakat / form-content.html
Created May 10, 2022 22:34 — forked from alexmustin/form-content.html
WordPress AJAX Live Search of Post Title
<!-- // The HTML (could be part of page content) // -->
<input type="text" name="keyword" id="keyword" onkeyup="fetch()"></input>
<div id="datafetch">Search results will appear here</div>
@mariakat
mariakat / ACF Country List
Created April 24, 2020 10:50 — forked from yaronguez/ACF Country List
Country list formatted for Advanced Custom Fields select dropdown
afghanistan : Afghanistan
albania : Albania
algeria : Algeria
american_samoa : American Samoa
andorra : Andorra
angola : Angola
anguilla : Anguilla
antigua_and_barbuda : Antigua and Barbuda
argentina : Argentina
armenia : Armenia
@mariakat
mariakat / index.php
Created April 6, 2020 08:43 — forked from webdevs-pro/index.php
ACF confirm password validation
<?php
add_filter('acf/validate_value/name=user_password_confirm', 'my_validated_password_filter', 10, 4);
function my_validated_password_filter($valid, $value, $field, $input) {
if (!$valid) {
return $valid;
}
// field key of the field you want to validate against
$password_field = 'field_5de8dff728aa2';
if ($value != $_POST['acf'][$password_field]) {
$valid = 'Does Not Match Password';
@mariakat
mariakat / currency-dropdown-list.html
Created April 3, 2020 09:40 — forked from AmrMekkawy/currency-dropdown-list.html
Currency HTML "select" element (dropdown list)
<select name="">
<option value="USD" selected="selected">United States Dollars</option>
<option value="EUR">Euro</option>
<option value="GBP">United Kingdom Pounds</option>
<option value="DZD">Algeria Dinars</option>
<option value="ARP">Argentina Pesos</option>
<option value="AUD">Australia Dollars</option>
<option value="ATS">Austria Schillings</option>
<option value="BSD">Bahamas Dollars</option>
<option value="BBD">Barbados Dollars</option>
@mariakat
mariakat / cloudSettings
Last active July 9, 2020 07:50
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-07-09T07:50:18.602Z","extensionVersion":"v3.4.3"}
@mariakat
mariakat / git-essentials.sh
Created December 11, 2018 18:09 — forked from raineorshine/git-essentials.sh
Git Cheat Sheet: Just the Essentials (13 Commands). See https://gist.github.com/5128563 for more.
# Status Commands - These are always safe to execute and don't change the repo.
git status # Print the status of the current repo
git log # Print a list of the most recent commits
git diff # Show all differences between unstaged changes
# and the last commit.
git remote -v # Show all remotes with name and url.
# Repo Commands - These modify the state of the repo in some way but do not modify files
git init # Initialize a new repo in the current folder
git add MYFILE # Add a file with changes to the staging area to be committed.
@mariakat
mariakat / index.html
Created August 4, 2017 11:01 — forked from vivom/index.html
PURE CSS INTERACTIVE MAP
<link href='//fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Roboto:100,300,400,700,900' rel='stylesheet' type='text/css'>
<h1>Pure CSS Interactive Map</h1>
<p class="description">This doesn&rsquo;t look great at small sizes &mdash; in the original, I have an alternate rule for displaying on mobile devices. <strong>Click the points to expand them.</strong></p>
<div class="distribution-map">
<!-- This was broken for a while because imgur :( -->
<!-- I don't trust this host. Image here if it goes down: http://i.imgur.com/M7aUkuS.png -->
<img src="http://s24.postimg.org/jnd9wc0n9/M7a_Uku_S.png">
<!--In the original application, these points are injected with Javascript, but ideally, they'd be injected with a haml loop. Because I'm hardcoding content, I'm presenting this as prerendered HTML-->
<button class="map-point" style="top:15%;left:35%">