Skip to content

Instantly share code, notes, and snippets.

Avatar

Cody Ogden codyogden

View GitHub Profile
@codyogden
codyogden / wp-auth0.php
Last active Aug 8, 2021
How to specify the Auth0 SSO connection in WordPress with PHP and skip the Auth0 Login Page.
View wp-auth0.php
<?php
/**
* Get a valid list of Auth0 Connection slugs.
* use the `wpa0_sso_connection` filter to add or remove slugs.
*
* @return Array Array of Auth0 Connection slugs.
*/
function wpa0_sso_connections() {
$connections = array();
return apply_filters( 'wpa0_sso_connections', $connections );
@codyogden
codyogden / buildlog.txt
Created Jul 28, 2021
The Umami build log from Digital Ocean
View buildlog.txt
```log
[2021-06-24 13:11:40] => Got dockerfile_path: Dockerfile
[2021-06-24 13:11:40]
[2021-06-24 13:11:41] => Building app using Dockerfile
[2021-06-24 13:11:41] => Injecting app environment variables:
[2021-06-24 13:11:41] HASH_SALT DATABASE_TYPE IGNORE_IP DATABASE_URL
[2021-06-24 13:11:41] => Using Dockerfile: /.app_platform_workspace/Dockerfile
[2021-06-24 13:11:41] => Using build context /.app_platform_workspace/
[2021-06-24 13:11:41]
@codyogden
codyogden / docsify-custom-paragraph-class-plugin.js
Created Feb 24, 2020
Add custom class to markdown paragraph with docsify plugin.
View docsify-custom-paragraph-class-plugin.js
/*
HTML String includes:
...
<p>.info> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
..
Matches and makes replacement with:
...
<p class="info">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
@codyogden
codyogden / README.md
Created Feb 11, 2020 — forked from darrenjaworski/README.md
DocScores api and pagination
View README.md
@codyogden
codyogden / CHANGELOG.md
Created Jun 12, 2019
Changelog from wpe-cli (WP Engine DevKit)
View CHANGELOG.md

0.13.0 (2019-06-10)

Bug Fixes

  • Push, pull and SSH should now respect default environments (e01d906)
  • Use appropriate output when trying to create a site that already exists (91fa121)
  • new: Ensure the top-level-domain is not repeated in new project domains (ab54624)
@codyogden
codyogden / Predawn.terminal
Created Apr 30, 2019
Cody Ogden's terminal theme.
View Predawn.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlueColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECcw
LjU3MjU0OTAxOTYgMC43NDkwMTk2MDc4IDAuNzQ5MDE5NjA3OAAQAoAC0hAREhNaJGNs
YXNzbmFtZVgkY2xhc3Nlc1dOU0NvbG9yohIUWE5TT2JqZWN0XxAPTlNLZXllZEFyY2hp
View webpack.config.js
const webpack = require('webpack');
module.exports = (env, argv) => {
const config = {
entry: './src/App.jsx',
output: {
path: __dirname,
publicPath: '/',
filename: '[name].js',
},
@codyogden
codyogden / wcmsp.txt
Created Aug 20, 2018
The list of attendee Twitter handles from the WordCamp Minneapolis/St. Paul site.
View wcmsp.txt
@abebumpus
@NetProductmgr
@apmeyer
@surrealwebs
@segaradam
@wpmodder
@asauk5
@oobbs
@andyurczyk
@andreaktrew
View slide-basic.php
<?php
$backgroundImage = get_sub_field('background_image');
$titleText = get_sub_field( 'title_text' );
$subtitleText = get_sub_field( 'subtitle_text' );
$buttonText = get_sub_field( 'button_text' );
$buttonLink = get_sub_field( 'button_link' );
?>
<div class="slide slide-basic" style="background-image:url('<?php echo $backgroundImage; ?>');">
<div class="slide-basic-content">
@codyogden
codyogden / getIEVersion.js
Created Oct 13, 2017
Detect the version of Internet Explorer (not Edge)
View getIEVersion.js
/**
* Get IE Version
* @returns {integer} Version of Internet Explorer, or 0
*/
function GetIEVersion() {
var sAgent = window.navigator.userAgent;
var Idx = sAgent.indexOf("MSIE");
// If IE, return version number.