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
'use strict' | |
const express = require('express') | |
const bodyParser = require('body-parser') | |
const axios = require('axios') | |
// Create a new instance of express | |
const app = express() |
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
<!DOCTYPE html> | |
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<!-- CSRF Token --> | |
<meta name="csrf-token" content="{{ csrf_token() }}"> | |
<title>{{ config('app.name', 'Laravel') }}</title> |
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
#!/bin/bash | |
echo | |
echo "This script will install a new WordPress site and use Valet to create a local domain." | |
echo | |
echo "Let's define the folder name. This folder will also serve as the domain of our site." | |
echo "(i.e. mysite => http://mysite.test)" | |
echo | |
echo -n "Enter folder name: " | |
read foldername |
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
import './style.scss'; | |
import './editor.scss'; | |
// Get just the __() localization function from wp.i18n | |
const { __ } = wp.i18n; | |
// Get registerBlockType and Editable from wp.blocks | |
const { registerBlockType, Editable } = wp.blocks; | |
// Set the h2 header for the block since it is reused | |
const blockHeader = <h2>{ __( 'Scripture Display' ) }</h2>; |
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
{ | |
"races": [ | |
{ | |
"race": { | |
"race_id": 24024, | |
"name": " \tCarson Park 5 and 10", | |
"last_date": "10/28/2017", | |
"last_end_date": "10/28/2017", | |
"next_date": "10/27/2018", | |
"next_end_date": "10/27/2018", |
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
/** | |
* Forwards a post to an external URL | |
*/ | |
function forward_post( $url, $post, $leavename ) { | |
// Check to see if a forwarding URL exists | |
if ( $forwarding_url = get_post_meta( $post->ID, '_forward_to_url', true ) ) | |
$url = $forwarding_url; | |
return $url; |
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 custom_post_type_init() { | |
// Define desired permalink structure | |
$post_type_rewrite = '/some_sluge_prefix/%[param1]%/%[param2]%/%[custom_post_type]%'; | |
// Add rewrite functions | |
add_rewrite_tag( '%[custom_post_type]%', '([^/]+)' ); | |
add_permastruct( '[custom_post_type]', $post_type_rewrite, false ); | |
} |
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 | |
if ( isset( $_REQUEST['logout'] ) ) { | |
setcookie("access_token", '', time()-3600); | |
setcookie("full_name", '', time()-3600); | |
header('Location: '); | |
} | |
if ( isset( $_COOKIE['access_token'] ) ) { | |
echo "<p>Hey " . $_COOKIE['full_name'] . "! You're already logged in. We don't know anything else about you, but we do know you gave us access to your information lol</p>"; |
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
Options FollowSymLinks | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} (\.json)$ | |
RewriteRule ^(.*)$ index.php?rt=$1 [L,QSA] | |
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$ | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?rt=$1 [L,QSA] |