Skip to content

Instantly share code, notes, and snippets.

View panvid's full-sized avatar
💻
Productive with coding

David Pauli panvid

💻
Productive with coding
View GitHub Profile
@ludofleury
ludofleury / A-result.txt
Created January 31, 2012 04:21
PHP get_class vs ReflectionObject vs ReflectionClass
This was a quick & dirty benchmark (for my own needs) to compare the method to get a class name in PHP
-ReflectionObject->getName();
-get_class();
-ReflectionClass->getName();
It was performed on my local machine : MacBookPro with PHP 5.3.6
You will find the result below and the code used for the 3 tests.
ReflectionObject
Memory : 750040
@leek
leek / gist:1942116
Created February 29, 2012 16:19
INSERT ... ON DUPLICATE KEY UPDATE with Zend Framework (Zend_Db_Table))
<?php

/**
 * @method DbTable_Row_Foo createRow()
 */
class DbTable_Foo extends Zend_Db_Table_Abstract
{
    protected $_primary  = 'foo_id';
    protected $_name     = 'foo';
@lordspace
lordspace / Fake Sendmail Configuration Mandrill
Created August 26, 2014 09:44
Fake Sendmail Configuration for Using it with Mandrill. Uses non-ssl version as the SSL one worked OK on CLI but hanged when accessed via Apache
; configuration for fake sendmail
; if this file doesn't exist, sendmail.exe will look for the settings in
; the registry, under HKLM\Software\Sendmail
[sendmail]
; you must change mail.mydomain.com to your smtp server,
; or to IIS's "pickup" directory. (generally C:\Inetpub\mailroot\Pickup)
; emails delivered via IIS's pickup directory cause sendmail to
const $ = $jQueryWom;
let boxes = $('.wom_hidecheckbox2');
let form = $('.wom_hidecheckbox2').parents('form');
let ids = [];
boxes.each(function () {ids.push(this.name)});
boxes.prop('checked', false);