Skip to content

Instantly share code, notes, and snippets.

View cfoellmann's full-sized avatar
🐶
Dogging on

Christian Foellmann cfoellmann

🐶
Dogging on
  • W&S Technik GmbH
  • Castrop-Rauxel, NRW, Germany
View GitHub Profile
<?php
class PluginNameGrunt {
/**
* PSR-0 compliant autoloader to load classes as needed.
*
* @static
* @access public
* @since 1.0.0
<?php
register_settings_on_network( 'option_name', array( 'some' => '1' ) );
function register_settings_on_network( $option_name, $defaults ) {
global $wpdb;
$blogs = $wpdb->get_results( "SELECT blog_id FROM {$wpdb->blogs}", ARRAY_A );
if ( $blogs ) {
@cfoellmann
cfoellmann / DocBlocks-for-WP.php
Created February 26, 2014 19:52
DocBlocks collection for WP development
<?php
/**
* DocBlocks for WordPress
*
* Structural Elements:
* -- to be documented with DocBlocks --
*
* class
* function (including methods)
* variable
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
files: {
src: 'assets/js/uber-media.js',
dest: 'assets/js/',
expand: true,
flatten: true,
ext: '.min.js'
@cfoellmann
cfoellmann / tribe-events-activation-connector-oop.php
Last active August 29, 2015 14:00
Auto-(De-)Activate 'The Events Calendar' with 'The Events Calendar Pro' + hide 'The Events Calendar' from plugins.php listing
<?php
class EventsConnector {
var $events_calendar;
public function __construct() {
$this->events_calendar = 'the-events-calendar/the-events-calendar.php';
$events_calendar_pro = WP_PLUGIN_DIR . '/events-calendar-pro/events-calendar-pro.php';
[28-Jul-2014 09:30:06 UTC] PHP Parse error: syntax error, unexpected end of file in /srv/www/wpmu-trunk/wp-content/themes/zephyr/includes/theme-template.php on line 281
@cfoellmann
cfoellmann / plugins.md
Last active August 29, 2015 14:04
NetBeans PHP bundle

NetBeans 8 fresh installation (netbeans-8.0-php-windows.exe 2014-08-03)

fresh-install

  • Plugins: 42
  • Active: 41

Deactivated unnecessary plugins - a minimal version

deactivated

@cfoellmann
cfoellmann / vvv-installer.ps1
Last active August 29, 2015 14:04
VVV Installer for Windows via PowerShell
<#
# ==============================================================================
#
# Varying Vagrant Vagrants for Windows
#
# ==============================================================================
@todo VBoxManage extpack install <.vbox-extpack> --replace # https://www.virtualbox.org/manual/ch08.html#vboxmanage-extpack
#>

Keybase proof

I hereby claim:

  • I am cfoellmann on github.
  • I am cfoellmann (https://keybase.io/cfoellmann) on keybase.
  • I have a public key whose fingerprint is 3B7F 6B3C 54BF 0A75 C8D9 BF27 896B 7AEE BBC5 717A

To claim this, I am signing this object:

@cfoellmann
cfoellmann / posh
Last active January 21, 2016 21:56
provisioning chocolatey-test-environment
PS D:\chocolatey-test-environment> vagrant up > provision.log
The following WinRM command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
powershell -ExecutionPolicy Bypass -OutputFormat Text -file c:\tmp\vagrant-shell.ps1
Stdout from the command: