git config --global core.autocrlf false
git config --global core.eol lf
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.require_version '>= 1.5.1' | |
Vagrant.configure('2') do |config| | |
config.vm.box = 'roots/bedrock' | |
config.vm.network :private_network, ip: '192.168.50.5' | |
config.vm.hostname = 'example.dev' |
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 # -*- coding: utf-8 -*- | |
/** | |
* Plugin Name: Plugin Class Demo | |
* Description: How I am using the base class in plugins. | |
* Plugin URI: | |
* Version: 2012.09.29 | |
* Author: Thomas Scholz | |
* Author URI: http://toscho.de | |
* License: GPL | |
* Text Domain: plugin_unique_name |
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 | |
/** | |
* Autoloader for WordPress plugins and themes | |
* http://wordpress.stackexchange.com/a/66484 | |
*/ | |
spl_autoload_register(__NAMESPACE__ . '\\autoload'); | |
function autoload($cls) | |
{ | |
$cls = ltrim($cls, '\\'); | |
if(strpos($cls, __NAMESPACE__) !== 0) |
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 | |
/** | |
* Plugin Name: Plugin Skeleton | |
* Description: Static Base plugin for WordPress. | |
* Version: 1.0.0 | |
* Author: starise | |
* Author URI: http://stari.se | |
* License: GPL | |
*/ |
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 | |
class vendorAutoloader | |
{ | |
const BASENAME = 'vendor'; | |
const BASESRC = 'src'; | |
/** | |
* Static loader method | |
* @param string $class |
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 Roots\Bedrock; | |
use League\CommonMark\CommonMarkConverter; | |
class MarkdownPosts { | |
const POST_OPTION = 'roots/bedrock/markdown_posts'; | |
const IS_MD_META = 'roots/bedrock/is_markdown'; |
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 | |
/** | |
* Generate JSON sitemap for use with UnCSS | |
*/ | |
function show_sitemap() { | |
if (WP_ENV === 'development' && isset($_GET['show_sitemap'])) { | |
More less the same as the subtrees
method, but:
- trellis and bedrock are 2 different git repos
- keep
.git
despite the doc tells you to delete it - i also have a branch (tangrufus/trellis@project-template) to keep all my common customization to start a project
- 3 git remotes for every project:
- roots/trellis
- tangrufus/trellis
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
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit } | |
# Create AppModelUnlock if it doesn't exist, required for enabling Developer Mode | |
$RegistryKeyPath = "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" | |
if (-not(Test-Path -Path $RegistryKeyPath)) { | |
New-Item -Path $RegistryKeyPath -ItemType Directory -Force | |
} | |
# Add registry value to enable Developer Mode | |
New-ItemProperty -Path $RegistryKeyPath -Name AllowDevelopmentWithoutDevLicense -PropertyType DWORD -Value 1 |
OlderNewer