Skip to content

Instantly share code, notes, and snippets.

View jrfnl's full-sized avatar
🐘
Herding 🐘

Juliette jrfnl

🐘
Herding 🐘
View GitHub Profile
@ryansechrest
ryansechrest / server-to-localhost.sh
Created December 23, 2013 07:40
Bash script to synchronize website directory and database between server and localhost or server and server.
#!/bin/bash
# Created on 10/8/13 by Ryan Sechrest
# site (localhost edition)
# Program to mirror a directory and database of a website between two servers.
### Program meta data
@szepeviktor
szepeviktor / wp-badrequest.php
Last active December 29, 2018 15:43
WordPress bad request - help Fail2ban to ban "deadly" requests
MOVED to: https://github.com/szepeviktor/wordpress-fail2ban/tree/master/block-bad-requests
@barrykooij
barrykooij / release-wpseo.sh
Last active August 29, 2015 14:01
The WordPress SEO Release script
#!/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,
@Rarst
Rarst / append.php
Last active April 27, 2016 12:31
My xhprof/uprofiler setup, tweaked for WordPress and more easily profiling segments.
<?php
use Rarst\Profiler\Handler;
global $wp;
if ( Handler::$profiling && empty( $wp ) ) {
Handler::close();
}
@matheuseduardo
matheuseduardo / get-page-by-slug.php
Last active March 23, 2022 07:58 — forked from micahblu/gist:5786794
get_page_by_slug - wordpress
<?php
/**
* Retrieve a page given its slug.
*
* @global wpdb $wpdb WordPress database abstraction object.
*
* @param string $page_slug Page slug
* @param string $output Optional. Output type. OBJECT, ARRAY_N, or ARRAY_A.
* Default OBJECT.
* @param string|array $post_type Optional. Post type or array of post types. Default 'page'.
@DragonBe
DragonBe / php_conferences_2016.md
Last active February 9, 2018 08:02
Overview of PHP oriented conferences in 2016 (excluding polyglot and framework oriented conferences)
@mlocati
mlocati / exceptions-tree.php
Created March 9, 2017 10:58
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
@Rarst
Rarst / .scrutinizer.yml
Last active August 13, 2019 11:37
Scrutinizer config to install PHPUnit on the fly, without shipping in project dependencies.
filter:
excluded_paths:
- 'tests/*'
checks:
php: true
build:
environment:
php:
version: 7.2
dependencies:
@Potherca
Potherca / README.md
Last active April 8, 2024 10:16
BASH script to clone all git repository in a Group on GitLab, or Organization on GitHub.

Introduction

Starting at a new employer always mean checking out various git repositories.

As the amount of repositories a company has grows, the time needed to clone all of those repositories also grows.

This script automates this task.

In order for this script to work, a personal access token is needed.

Time Travel Debugging

Time Travel refers to the ability to record a tab and later replay it ([WebReplay][wrr]). The technology is useful for local development, where you might want to:

  • pause and step forwards or backwards
  • pause and rewind to a prior state
  • rewind to the time a console message was logged
  • rewind to the time an element had a certain style or layout
  • rewind to the time a network asset loaded