Skip to content

Instantly share code, notes, and snippets.

View jeffsebring's full-sized avatar

Jeff Sebring jeffsebring

  • Spokane, Washington USA
View GitHub Profile
@Viper007Bond
Viper007Bond / whatissoslow.php
Last active October 29, 2023 14:23
WordPress: Times how long it takes each filter and action to run and displays results at the end of the page. Quick and dirty.
<?php
/**
* This little class records how long it takes each WordPress action or filter
* to execute which gives a good indicator of what hooks are being slow.
* You can then debug those hooks to see what hooked functions are causing problems.
*
* This class does NOT time the core WordPress code that is being run between hooks.
* You could use similar code to this that doesn't have an end processor to do that.
*
@markjaquith
markjaquith / gist:4219135
Last active October 13, 2015 15:48
Script for applying WordPress patches. Provide an ID (prompts you to select patch), a Trac patch URL, or a raw Trac patch URL
#!/usr/bin/ruby
#
# The MIT License (MIT)
# Copyright (c) 2013 Mark Jaquith
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@axilleas
axilleas / archgitlab.sh
Last active March 29, 2021 11:53
Install GitLab 5.0 on Archlinux
#!/bin/bash
##########################
## Check if run as root ##
##########################
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
@adactio
adactio / tabledisplaytest.html
Created August 16, 2011 10:36
Content-first table-display test
<!DOCTYPE html>
<html>
<head>
<title>Table Display test</title>
<style>
@media screen and (min-width: 30em) {
body {
display: table;
caption-side: top;
}
@chriscoyier
chriscoyier / gist:972699
Created May 14, 2011 22:20
commentcodeplugin.md

IDEA: WordPress Plugin for Improving Leaving Code in Comments

It's always quite a struggle to keep people doing it correctly on CSS-Tricks, so I'd love if there was a plugin to make it more foolproof.

The overall idea: make it so if you use <code> tags, it will come out perfectly.


1) Automatically escape code that isn't escaped