Skip to content

Instantly share code, notes, and snippets.

View Archie22is's full-sized avatar
💭
I may be slow to respond.

ᴀʀᴄʜɪᴇ ᴍᴀᴋᴜᴡᴀ™ Archie22is

💭
I may be slow to respond.
View GitHub Profile
@Archie22is
Archie22is / logos.html
Created December 8, 2022 05:38
Three CSS tips for working with inconsistently sized logos
<div class="photos">
<img src="image-1.png" alt="Image">
<img src="image-2.png" alt="Image">
<img src="image-3.png" alt="Image">
<img src="image-4.png" alt="Image">
@Archie22is
Archie22is / term.bash
Created November 24, 2022 03:29
SFTP to a server using terminal
#SSH
$ sftp username@myserver.dreamhost.com
# Once logged, to list files
sftp> ls
# To view "Present Working Directory"
sftp> pwd
@Archie22is
Archie22is / functions.php
Created November 17, 2022 05:08
Check/verify that the logged in user has submitted a specific Gravity Form
<?php
/**
* Check/verify that the logged in user has submitted a specific Gravity Form
* https://aaronjerad.com/blog/check-if-user-submitted-gravity-form/
*
*/
add_action ('genesis_before_loop', 'submitted_form_check');
function submitted_form_check(){
@Archie22is
Archie22is / functions.php
Created November 7, 2022 10:36
Woocommerce-order-complete-external-api-curl-post
<?php
/* after an order has been processed, use the 'woocommerce_thankyou' hook, to add our function, to send the data */
add_action('woocommerce_thankyou', 'wdm_send_order_to_ext');
function wdm_send_order_to_ext( $order_id ){
// get order object and order details
$order = new WC_Order( $order_id );
$email = $order->billing_email;
$phone = $order->billing_phone;
$shipping_type = $order->get_shipping_method();
$shipping_cost = $order->get_total_shipping();
@Archie22is
Archie22is / test.html
Created September 28, 2022 15:14
Wrap and unwrap tables using jQuery based on screen width
<!-- HTML -->
<table>
<tr>
<td>Cell 1</td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
<tr>
<td>Cell 4</td>
<td>Cell 5</td>
@Archie22is
Archie22is / scrollable-overlay.html
Created September 28, 2022 09:02 — forked from edavis25/scrollable-overlay.html
Scrollable full-screen HTML overlay
<!DOCTYPE html>
<!-- SCROLLABLE OVERLAY -->
<html>
<head>
<style>
.overlay {
height: 0%;
width: 100%;
position: fixed;
z-index: 1;
@Archie22is
Archie22is / .gitignore
Last active September 15, 2022 11:58
GITIGNORE HACKS
##########################################################################################################
# Ignore some shit
#
##########################################################################################################
.DS_Store
**/.DS_Store
# A leading "**" followed by a slash means match in all directories.
@Archie22is
Archie22is / sshstuff.bash
Created September 13, 2022 13:54
Generating a custom SSH key and copying it to your Downloads folder
# Generating a custom SSH Key
ssh-keygen -t rsa -f ~/.ssh/id_rsa_custom_shit
# Copying the custom shit SSH key to your Download directory
cp id_rsa_liquid.pub /Users/user/Downloads/id_rsa_custom_shit.pub
@Archie22is
Archie22is / index.html
Created August 26, 2022 13:55 — forked from laurenclark/index.html
Pure CSS Social Media Icons
<div class="footer-social-icons">
<h4 class="_14">Follow us on</h4>
<ul class="social-icons">
<li><a href="" class="social-icon"> <i class="fa fa-facebook"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-twitter"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-rss"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-youtube"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-linkedin"></i></a></li>
<li><a href="" class="social-icon"> <i class="fa fa-google-plus"></i></a></li>
</ul>
<?php
if(!function_exists('wc_get_products')) {
return;
}
$paged = (get_query_var('paged')) ? absint(get_query_var('paged')) : 1;
$ordering = WC()->query->get_catalog_ordering_args();
$ordering['orderby'] = array_shift(explode(' ', $ordering['orderby']));
$ordering['orderby'] = stristr($ordering['orderby'], 'price') ? 'meta_value_num' : $ordering['orderby'];