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
location ~ "^(.*)/wp-content/uploads/(.*)$" { | |
if ( !-e $request_filename ) { | |
rewrite "^(.*)/wp-content/uploads/(.*)$" "https://***.com/wp-content/uploads/$2" redirect; | |
} | |
} | |
location ~ "^(.*)/wp-content/cache/thumb/(.*)$" { | |
if ( !-e $request_filename ) { | |
rewrite "^(.*)/wp-content/cache/thumb/(.*)$" "https://***.com/wp-content/cache/thumb/$2" redirect; | |
} |
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/sh | |
# Creates a new monorepo by fusing multiple repositories | |
# Child repositories that are going to be fused | |
CHILDREN="wp/theme/master plugins/gutenblocks/master wp/theme-core/master" | |
# Name of the created monorepo | |
MONOREPO="monorepo" | |
# Exit in case of any error |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="BladeInjectionConfiguration" default="false"> | |
<directives> | |
<!-- Sage Directives - WordPress - https://log1x.github.io/sage-directives-docs/usage/wordpress.html--> | |
<data directive="@query" injection="true" prefix="(" suffix=")"/> | |
<data directive="@posts" injection="true" prefix="(" suffix=")"/> | |
<data directive="@hasposts" injection="true" prefix="(" suffix=")"/> | |
<data directive="@noposts" injection="true" prefix="(" suffix=")"/> | |
<data directive="@titl"/> |
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 | |
/** | |
* Using WP Statuses for custom Post Types. | |
* | |
* @link http://github.com/imath/wp-statuses | |
*/ | |
// Exit if accessed directly. | |
defined( 'ABSPATH' ) || exit; |
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 JensSogaard; | |
class BlockHelper | |
{ | |
/** | |
* Gets ACF fields for a specific block on a given post | |
* @author Jens Soegaard <jens@jenssogaard.com> | |
*/ | |
public function getBlockFromPage(string $block_id, int $post_id) |
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
# Description: Boxstarter Script | |
# Author: ElJefeDSecurIT | |
# Last Updated: 2017-10-10 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
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/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
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 add_new_separator( $separators ) { | |
$separators_new = [ | |
'sc-flore' => '✿', | |
'sc-air' => '✈', | |
'sc-drive' => '✇', | |
'sc-skull' => '☠', | |
'sc-anchor' => '⚓', | |
'sc-circle-star' => '✯', | |
'sc-gier' => '⚙', |
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
#--------------------------------------------------------------------------------------- | |
# Aliases for Git | |
#--------------------------------------------------------------------------------------- | |
alias gc="git clone" | |
alias gcm="git commit -m" | |
alias gco="git checkout" | |
alias grv='git remote -v' | |
alias gba="git branch -a" | |
alias gwait="git reset HEAD" | |
alias gundo="git reset --soft HEAD^" |
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
$userPath = $env:USERPROFILE | |
$pathExclusions = New-Object System.Collections.ArrayList | |
$processExclusions = New-Object System.Collections.ArrayList | |
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null | |
$pathExclusions.Add('C:\Windows\assembly') > $null | |
$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null | |
$pathExclusions.Add('C:\ProgramData\Microsoft\VisualStudio\Packages') > $null | |
$pathExclusions.Add('C:\Program Files (x86)\MSBuild') > $null | |
$pathExclusions.Add('C:\Program Files (x86)\Microsoft Visual Studio 14.0') > $null |
NewerOlder