In File Explorer, go to C:\MAMP\conf\apache
and open httpd.conf
with your text editor.
Find this line:
# Virtual hosts
# Include conf/extra/httpd-vhosts.conf
<?php | |
/** | |
* Example useage: | |
* | |
* maybe_sideload_image( 'https://dummyimage.com/600x400/000/fff.png' ); // Downloads image to the media library and returns an attachment ID | |
* maybe_sideload_image( 'https://dummyimage.com/600x400/000/fff.png' ); // Returns an attachment ID as the image has already been downloaded and added to the media library | |
*/ | |
/** |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
# Pull Image Files From Live Server | |
RewriteCond %{REQUEST_FILENAME} !-f [NC] | |
RewriteRule ^(.*\.(png|jpe?g|gif|ico|svg)) https://production-site.com//$1 [NC,L] | |
RewriteRule ^index\.php$ - [L] |
<?php | |
/** | |
* Plugin Name: Offload API Helper | |
* Plugin URI: iwritecode.blog | |
* Description: Offload plugins during API requests to reduce overhead. | |
* Author: Chris Kelley | |
* Author URI: iwritecode.blog | |
* Version: 1.0.0 | |
*/ |
#!/bin/bash | |
# Regolith aka Un-Bedrock | |
# "But what if we need to hand it off to another agency?" No more! | |
# This script converts a Bedrock site to a normal WordPress structure. | |
# Run it from the root of a Bedrock project. | |
# Created by Nathan Knowler and Daniel Roe | |
echo "Converting Bedrock to a normal WordPress file structure..." |
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Collection; | |
use Illuminate\Pagination\LengthAwarePaginator; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
public function boot() |
/* https://fonts.google.com/specimen/Roboto?selection.family=Roboto:300,400,500,700 https://www.fontsquirrel.com/tools/webfont-generator */ | |
@font-face { | |
font-family: 'Roboto'; | |
font-style: normal; | |
font-weight: 300; | |
src:url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAGSwABMAAAAAtfwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABqAAAABwAAAAcZSXU3EdERUYAAAHEAAAAlQAAAOYXGhVYR1BPUwAAAlwAAAdrAAAQ5noXPxxHU1VCAAAJyAAAATQAAAKy3SOq409TLzIAAAr8AAAAUwAAAGCgNqyhY21hcAAAC1AAAAGPAAAB6gODigBjdnQgAAAM4AAAAEIAAABCEToKw2ZwZ20AAA0kAAABsQAAAmVTtC+nZ2FzcAAADtgAAAAIAAAACAAAABBnbHlmAAAO4AAATFsAAIy8VrEAaGhlYWQAAFs8AAAAMwAAADYN24w7aGhlYQAAW3AAAAAgAAAAJA8tBb1obXR4AABbkAAAAnoAAAOqnWlWT2xvY2EAAF4MAAAByQAAAdgbwD2ObWF4cAAAX9gAAAAgAAAAIAIIAaduYW1lAABf+AAAAc0AAAPGOTyS+XBvc3QAAGHIAAAB8gAAAu/ZWLW+cHJlcAAAY7wAAADqAAABofgPHd13ZWJmAABkqAAAAAYAAAAGcF9X0gAAAAEAAAAAzD2izwAAAADE8BEuAAAAANP4IN542h3P2UoCYBBA4fP/eO1D+KiVCppaKC64laaCuaK44NqLdJngU3RqDgPfXA4BSLrf/E0kReDBfeTJK22BjEWy5HSeZ12gqEu86FfKukJV1yxQt0iDpm7R1h26+s0i7/R0nw89sMDQIiPG+p |
/** | |
* Fix for vw, vh, vmin, vmax on iOS 7. | |
* http://caniuse.com/#feat=viewport-units | |
* | |
* This fix works by replacing viewport units with px values on known screen sizes. | |
* | |
* iPhone 6 and 6 Plus cannot run iOS 7, so are not targeted by this fix. | |
* Target devices running iOS 8+ will incidentally execute the media query, | |
* but this will still produce the expected result; so this is not a problem. | |
* |
As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
/** | |
* @file A WordPress-like hook system for JavaScript. | |
* | |
* This file demonstrates a simple hook system for JavaScript based on the hook | |
* system in WordPress. The purpose of this is to make your code extensible and | |
* allowing other developers to hook into your code with their own callbacks. | |
* | |
* There are other ways to do this, but this will feel right at home for | |
* WordPress developers. | |
* |