Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew AndrewSepic

View GitHub Profile
@AndrewSepic
AndrewSepic / linux-commands.trm
Last active Oct 18, 2021
My Favourite Linux/Terminal Commands
View linux-commands.trm
// Disk Usage
// -h Human readable -dX depth of returned folders /filepath where the du command initiates
du -h -d2 /sites/onsmd
// Remove Directory with Files
rm -rf filname
@AndrewSepic
AndrewSepic / My Favourite GIT commands
Last active Aug 8, 2021
A list of my most used git commands for reference
View My Favourite GIT commands
// Create a new branch from the current branch which has uncommitted work
git checkout -b <branch_name>
// Fetch all latest versions of remote & branches
git fetch -all
// Delete a local branch (forces delete with -D rather than -d )
$ git branch -D <local-branch>
// See what files were changed in a commit
@AndrewSepic
AndrewSepic / search.php
Created Jan 8, 2021
Search Results template for Prana Framework
View search.php
<?php
/**
* The template for displaying search results pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
* @package Prana
*/
get_header(); ?>
View module-instagram.php
<?php
/**
* Template part for displaying the instagram Feed. Dependent upon Smashballoon's instagram feed pro
*
* @link https://www.advancedcustomfields.com/resources/flexible-content/
*
* @package Prana
*/
// settings
View Fancy 50-50 Module
<?php
/**
* Template part for displaying the 50/50 Module
*
* @link https://www.advancedcustomfields.com/resources/flexible-content/
*
* @package Prana
*/
// settings
View vod-login.php
<?php
//Check that the user is logged in/ has been verified and has cookies set
if ( isset( $_COOKIE['isAuthorized'] ) ){
$current_user = $_COOKIE['clientName'];
echo '<p>Welcome ' . $current_user . ' | <a class="mboLogOut" href="#">Logout</a></p>';
?>
<script>
View wpengine- gitignore
*~
.DS_Store
.svn
.cvs
*.bak
*.swp
Thumbs.db
# Scout Multi-site specific
wp-content/plugins/
View request.js
<script>
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
console.log(this.responseText);
}
});
View push-ignore
# This file lists which files should not be pushed by WPE DevKit. Feel free to
# add, remove, or comment lines to change the sync behavior, but note that this
# file will be recreated with the default values if it is missing. There are a
# few additional files, including wp-config.php, which are ignored no matter
# what as synchronizing these files would almost certainly result in an unusable
# install.
# Temporary and OS files
*~
.DS_Store
View ACF-Filters.php
// Create Filters ?>
<div id="vod-filters">
<h2>Filters <span class="arrow down-default"></span></h2>
<div class="filters-wrap">
<?php foreach( $GLOBALS['my_query_filters'] as $key => $name ):
// get the field's settings without attempting to load a value
$field = get_field_object($key, false, false);
//var_dump($field);
// set value if available