Skip to content

Instantly share code, notes, and snippets.

<?php
/*
Plugin Name: Enable/Disable plugins when doing local dev
Plugin URL: https://gist.github.com/pbiron/52bb63042cf220256ece89bc07fb57b0
Description: If the WP_LOCAL_DEV constant is true, enables/disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Paul V. Biron/Sparrow Hawk Computing
Author URI: https://sparrowhawkcomputing.com
*/
@neopunisher
neopunisher / curl_httpheaders.php
Last active October 3, 2017 14:45
Parse the http headers that curl returns raw
<?
$sUrl = 'http://cartercole.com';
$oCurlConnection = curl_init();
curl_setopt($oCurlConnection, CURLOPT_FAILONERROR, true); // If error code found, fail connection
curl_setopt($oCurlConnection, CURLOPT_URL,$sUrl); // Url to request
//curl_setopt($oCurlConnection, CURLOPT_USERAGENT, $sUserAgent); // User Agent of request
curl_setopt($oCurlConnection, CURLOPT_CONNECTTIMEOUT, 30); // Time out for a single connection
@revolunet
revolunet / angularjs.md
Last active October 22, 2021 00:36
BeerJS + AngularJS Paris le 25/2

AngularJS best ressources

Following the AngularJS PARIS meetup (25/2 à 19h à Paris with @sampaccoud @dzen @_kemar @tchack13 @vinz et @revolunet)

Here's our best AngularJS ressources : twitter, github, articles & blogs. Please comment and add your good stuff !

@jonathonbyrdziak
jonathonbyrdziak / example.php
Created February 22, 2012 02:27
Wordpress Metabox, stand alone class for multiple metabox abilities
<?php
/*
Here's a couple of metaboxes that I've recently created using this system
*/
$subpostings = redrokk_metabox_class::getInstance('subpostings', array(
'title' => '(optional) Subscription for Postings',
'description' => "As an optional feature, you have a complete api at your disposal which will allow you the ability to offer and manage member posts. In addition to these settings, you may need to create the associated pages for accepting posts from your frontend.",
@tzi
tzi / index.html
Created January 13, 2012 16:48
PrintPreview
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PrintPreview - A bookmarklet to preview the print version of a web page</title>
<meta name="viewport" content="initial-scale=1.0">
<link rel="stylesheet" href="style.css" >
</head>
<body>
<h1>PrintPreview</h1>
@markjaquith
markjaquith / disable-plugins-when-doing-local-dev.php
Created June 24, 2011 10:24
Disables specified WordPress plugins when doing local development
<?php
/*
Plugin Name: Disable plugins when doing local dev
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify
Version: 0.1
License: GPL version 2 or any later version
Author: Mark Jaquith
Author URI: http://coveredwebservices.com/
*/