Skip to content

Instantly share code, notes, and snippets.

View pdewouters's full-sized avatar
🌄
Working from home

Paul de Wouters pdewouters

🌄
Working from home
View GitHub Profile
@pdewouters
pdewouters / gist:10056277
Created April 7, 2014 21:07
VIP quickstart
VM must be created before running this command. Run `vagrant up` first.
_ __(_)___ ____ ___ __(_)____/ /_______/ /_____ ______/ /_
| | / / / __ \ / __ `/ / / / / ___/ //_/ ___/ __/ __ `/ ___/ __/
| |/ / / /_/ / / /_/ / /_/ / / /__/ ,< (__ ) /_/ /_/ / / / /_
|___/_/ .___/ \__, /\__,_/_/\___/_/|_/____/\__/\__,_/_/ \__/
/_/ /_/
Enter your password to continue:
@pdewouters
pdewouters / gist:10738553
Created April 15, 2014 14:48
filedmanager group with a repeatable field
public function init() {
$fm = new Fieldmanager_Group( array(
'name' => 'fs_team_fields',
'children' => array(
'fs_ad_module' => new Fieldmanager_TextArea( 'Hello' ),
'repeatabletext' => new Fieldmanager_Textfield( 'Goodbye', array(
'limit' => 0,
'add_more_label' => 'Add another field',
'sortable' => true,
'label' => 'Text Field'
@pdewouters
pdewouters / gist:d7cf57f941368296923d
Created May 10, 2014 15:03
Output of vagrant up --provision --debug
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 => 2222 (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...

Keybase proof

I hereby claim:

  • I am pdewouters on github.
  • I am paulwp (https://keybase.io/paulwp) on keybase.
  • I have a public key whose fingerprint is E05C 55CC 887A AD92 9C84 7E7D 8DE2 2827 44AD 0B36

To claim this, I am signing this object:

[25-Aug-2014 13:33:30 UTC] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 1048576 bytes) in /srv/www/backupwordpress.dev/content/plugins/query-monitor/wp-content/db.php on line 86
[25-Aug-2014 13:33:30 UTC] PHP Stack trace:
[25-Aug-2014 13:33:30 UTC] PHP 1. {main}() /srv/www/backupwordpress.dev/wordpress/wp-admin/admin-ajax.php:0
[25-Aug-2014 13:33:30 UTC] PHP 2. do_action() /srv/www/backupwordpress.dev/wordpress/wp-admin/admin-ajax.php:92
[25-Aug-2014 13:33:30 UTC] PHP 3. call_user_func_array:{/srv/www/backupwordpress.dev/wordpress/wp-includes/plugin.php:470}() /srv/www/backupwordpress.dev/wordpress/wp-includes/plugin.php:470
[25-Aug-2014 13:33:30 UTC] PHP 4. HM_Backdrop_Server::spawn() /srv/www/backupwordpress.dev/wordpress/wp-includes/plugin.php:470
[25-Aug-2014 13:33:30 UTC] PHP 5. call_user_func:{/srv/www/backupwordpress.dev/content/plugins/backupwordpress/backdrop/server.php:30}() /srv/www/backupwordpress.dev/content/plugins/backupwordpress/backdrop/serve
<?php
global $wpdb;
$results = get_transient( 'hub_listed_blogs' );
if ( false === $results ) {
$results = $wpdb->get_results( 'SELECT blog_id, domain FROM wp_blogs', ARRAY_A );
// cache for a week
[Composer\Downloader\TransportException]
The "http://wpackagist.org/p/providers-old$db38c4e119bef692cdbcd98bf1a2e211ba4dc416decaad19427dd9935251a453.json" file coul
d not be downloaded: Failed to open http://wpackagist.org/p/providers-old$db38c4e119bef692cdbcd98bf1a2e211ba4dc416decaad194
27dd9935251a453.json (Operation timed out after 4977 milliseconds with 3204617 out of 4692698 bytes received)
@pdewouters
pdewouters / npm-debug.log
Created November 29, 2014 16:57
Debug log for npm install -g browser-sync
This file has been truncated, but you can view the full file.
0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/local/bin/npm', 'install', '-g', 'browser-sync' ]
2 info using npm@2.1.10
3 info using node@v0.10.33
4 verbose node symlink /usr/local/bin/node
5 silly cache add args [ 'browser-sync', null ]
6 verbose cache add spec browser-sync
7 silly cache add parsed spec { raw: 'browser-sync',
7 silly cache add scope: null,
7 silly cache add name: 'browser-sync',
@pdewouters
pdewouters / gist:f353786df2d2cd1faead
Last active August 29, 2015 14:10
Unix permissions
var_dump(chmod( $this->path->get_default_path(), 0555 ));
var_dump("owner of the current PHP script " . get_current_user());
print_r(posix_getpwuid(fileowner($this->path->get_default_path())));
var_dump(substr(sprintf('%o', fileperms($this->path->get_default_path())), -4));
@pdewouters
pdewouters / gist:d35c3e54679b058fc22c
Created December 24, 2014 10:39
Sensiolabs plugin error
Empty PSI elements should not be passed to createDescriptor. Start: PhpDocTagValue, end: PhpDocTagValue
java.lang.Throwable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115)
at com.intellij.codeInspection.ProblemDescriptorBase.<init>(ProblemDescriptorBase.java:70)
at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:75)
at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:64)
at com.intellij.codeInspection.ProblemsHolder.registerProblem(ProblemsHolder.java:66)
at com.sensiolabs.insight.inspection.SensioLabsLocalXmlInspection$1.onLineMatch(SensioLabsLocalXmlInspection.java:51)
at com.sensiolabs.insight.psi.PsiViolationUtil.attachLineViolations(PsiViolationUtil.java:65)
at com.sensiolabs.insight.inspection.SensioLabsLocalXmlInspection.buildVisitor(SensioLabsLocalXmlInspection.java:47)