I hereby claim:
- I am joeydi on github.
- I am joeydi (https://keybase.io/joeydi) on keybase.
- I have a public key ASB6IJBFpagmExbBSLWom7gAx_eGceQ1_OuJmelD8f5_hwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| export default { | |
| async fetch(request) { | |
| let url = new URL(request.url) | |
| url.hostname = 'storage.googleapis.com' | |
| url.pathname = url.pathname.replace(new RegExp('^/assets'), '/mamava-web-assets') | |
| return await fetch(url); | |
| } | |
| }; |
| class ShiftInlineForm(forms.ModelForm): | |
| def __init__(self, *args, **kwargs): | |
| ordinals = [ | |
| 'First', | |
| 'Second', | |
| 'Third', | |
| 'Fourth', | |
| 'Fifth', | |
| 'Sixth', | |
| 'Seventh', |
| <?php | |
| new WF_HolidayOrdering(); | |
| class WF_HolidayOrdering | |
| { | |
| const MANAGER_ROLES = ['administrator']; | |
| const HOLIDAY_ORDERING_FORM_IDS = [6, 16]; | |
| const HIDDEN_FIELD_LABELS = ['In-Store Order']; | |
| const LOCATION_FIELD_ID = 12; |
| <?php | |
| // The include_app function loads the React app and merges in the SEO tags and post content for indexing | |
| // Basically a poor man's server-side rendering - if I were to do this again I'd probably use Next.JS | |
| function include_app() | |
| { | |
| $index = file_get_contents(EFA::theme_path('progress-meter/app/build/index.html')); | |
| $end_head = '</head>'; |
| #!/bin/bash | |
| USER="root" | |
| PASSWORD="root" | |
| ExcludeDatabases="Database|information_schema|performance_schema|mysql|sys" | |
| databases=`mysql -u$USER -p$PASWORD -e "SHOW DATABASES;" | tr -d "| " | egrep -v $ExcludeDatabases` | |
| for db in $databases; do | |
| echo "Dumping database: $db" |
| /* | |
| * | |
| * Bootstrap 3 input group form for Contact Form 7 | |
| * | |
| * In the shortcode, you must use html_id="my-id" | |
| * or html_class="my-class" to target a specific form | |
| * | |
| * Actual form sample: | |
| * <label for="your-email">Email:</label> | |
| * [email* your-email 0/ placeholder "enter your email"] |
| #!/usr/local/bin/python3 | |
| import sys | |
| import argparse | |
| import html | |
| import requests | |
| from pprint import pprint | |
| ICON_INFO = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M13 7.5a1 1 0 11-2 0 1 1 0 012 0zm-3 3.75a.75.75 0 01.75-.75h1.5a.75.75 0 01.75.75v4.25h.75a.75.75 0 010 1.5h-3a.75.75 0 010-1.5h.75V12h-.75a.75.75 0 01-.75-.75z"></path><path fill="currentColor" fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path></svg>' | |
| ICON_ERROR = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="currentColor" d="M12 7a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm1 9a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill="currentColor" fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path></svg>' |
| #!/bin/bash | |
| WORK_TREE="/var/www/example" | |
| GIT_DIR="/var/repo/example.git" | |
| BRANCH="master" | |
| while read oldrev newrev ref | |
| do | |
| # only checking out the master (or whatever branch you would like to deploy) | |
| if [ "$ref" = "refs/heads/$BRANCH" ]; | |
| then |
| #!/bin/bash | |
| # Download WordPress, create database, configure, and install | |
| if [ $1 ] | |
| then | |
| echo "Installing in directory $1" | |
| mkdir $1 | |
| cd $1 |