Skip to content

Instantly share code, notes, and snippets.

Avatar
🐘
Herding 🐘

Juliette jrfnl

🐘
Herding 🐘
View GitHub Profile
@barrykooij
barrykooij / release-wpseo.sh
Last active Aug 29, 2015
The WordPress SEO Release script
View release-wpseo.sh
#!/bin/sh
# License: GPL v3
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
@sergeylukin
sergeylukin / pre-receive
Last active Oct 7, 2015
Git hook (pre-receive): commit any local changes before PUSH accepted
View pre-receive
#!/bin/sh
#
# This hooks is placed in a Bare repository
# It makes sure that working tree doesn't contain any local changes
# And if it contains - submits a commit and returns false
# So if false returned - client should PULL and then PUSH again
#
# Assuming following file structure:
# .
# |-- myproject
@wojtha
wojtha / gist:1034262
Created Jun 19, 2011
PHP Syntax Check for Git pre-commit hook for Windows PowerShell
View gist:1034262
###############################################################################
#
# PHP Syntax Check for Git pre-commit hook for Windows PowerShell
#
# Author: Vojtech Kusy <wojtha@gmail.com>
#
###############################################################################
### INSTRUCTIONS ###
@Rarst
Rarst / append.php
Last active Apr 27, 2016
My xhprof/uprofiler setup, tweaked for WordPress and more easily profiling segments.
View append.php
<?php
use Rarst\Profiler\Handler;
global $wp;
if ( Handler::$profiling && empty( $wp ) ) {
Handler::close();
}
@krogsgard
krogsgard / meta-box-control.php
Created Feb 4, 2013
gist to lower priority of WP SEO metabox
View meta-box-control.php
<?php
add_filter('wpseo_metabox_prio','krogs_lower_wpseo_metabox', 10 );
function krogs_lower_wpseo_metabox( $priority ) {
$priority = 'low';
return $priority;
@ryansechrest
ryansechrest / post-receive.sh
Last active Feb 12, 2017
Git post-receive hook to deploy WordPress and plugins as submodules. It can also install Node.js modules with npm and vendor packages with Composer.
View post-receive.sh
#!/bin/bash
# Created on 7/17/13 by Ryan Sechrest
# Deploys pushed branch from the origin repository to the web directory
if [[ (-n $1) && (-n $2) && (-n $3) ]]; then
# Set path to project directory
project_path="/var/www/domains/$2/$3"
@manchuck
manchuck / pre-commit
Last active Sep 19, 2017
This is a ZF2 precommit hook that runs Lint, Mess Detector, Code sniffer then classmap builder on commit
View pre-commit
#!/bin/sh
echo
exec powershell.exe -ExecutionPolicy RemoteSigned -File '.\.git\hooks\pre-commit-hook.ps1'
exit
@DragonBe
DragonBe / php_conferences_2016.md
Last active Feb 9, 2018
Overview of PHP oriented conferences in 2016 (excluding polyglot and framework oriented conferences)
View php_conferences_2016.md
@szepeviktor
szepeviktor / wp-badrequest.php
Last active Dec 29, 2018
WordPress bad request - help Fail2ban to ban "deadly" requests
View wp-badrequest.php
MOVED to: https://github.com/szepeviktor/wordpress-fail2ban/tree/master/block-bad-requests
@cameronmalek
cameronmalek / pre-receive.sh
Last active Feb 4, 2019
The `hooks/pre-receive` file I use for cameronmalek.com and other sites. It makes sure the working directory is clean before pushing updates, forcing the developer to commit and pull server-side updates first. It doesn't detect any staged, uncommitted files. A situation where someone stages but fails to commit a file isn't anticipated.
View pre-receive.sh
#!/bin/sh
export GIT_WORK_TREE=/home/cameronm/public_html/
export GIT_DIR=/home/cameronm/git/cameronmalek.git
ec=0
# test for unstaged, uncommitted files
git diff --exit-code &>-
if [ "$?" -ne 0 ]; then
echo "Changes not staged"