View splitNames.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function orderby_lastname ($legislator_name) { | |
$explodedName = explode(' ', $legislator_name); | |
if (count($explodedName) == 2) { | |
$lastNameFirst = array_reverse($explodedName); | |
$lastNameFirst = implode(' ', $lastNameFirst); | |
} else { | |
$lastName = array_pop($explodedName); | |
array_unshift($explodedName, $lastName); | |
$lastNameFirst = implode(' ', $explodedName); | |
} |
View getOrderResult.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace SoapSapBridge\Server\Action\GetOrder\Nodes; | |
/** | |
* Class GetOrdersResult | |
* @package SoapSapBridge\Server\Model\GetOrdersModel | |
*/ | |
class GetOrdersResult { | |
/** |
View linux-commands.trm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
View My Favourite GIT commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
View search.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Template part for displaying the 50/50 Module | |
* | |
* @link https://www.advancedcustomfields.com/resources/flexible-content/ | |
* | |
* @package Prana | |
*/ | |
// settings |
View vod-login.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*~ | |
.DS_Store | |
.svn | |
.cvs | |
*.bak | |
*.swp | |
Thumbs.db | |
# Scout Multi-site specific | |
wp-content/plugins/ |
View request.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
var xhr = new XMLHttpRequest(); | |
xhr.withCredentials = true; | |
xhr.addEventListener("readystatechange", function() { | |
if(this.readyState === 4) { | |
console.log(this.responseText); | |
} | |
}); |
NewerOlder