Skip to content

Instantly share code, notes, and snippets.

View baldurrensch's full-sized avatar

Baldur Rensch baldurrensch

  • Sourceability LLC
  • Irvine, CA
View GitHub Profile
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active June 10, 2024 15:37
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@RogWilco
RogWilco / kextload.virtualbox.sh
Created June 21, 2013 18:39
Loads the required OS X kernel extensions for VirtualBox. This is specifically useful in the developer preview of OS X 10.9 Mavericks, which for some reason does not seem to automatically load these kernel extensions (which, consequently, will prevent most VMs from successfully booting). Use launchd to have this script run on boot to ensure they…
#!/bin/bash
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxDrv.kext"
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxNetFlt.kext"
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxNetAdp.kext"
sudo kextload -r "/Library/Extensions/" "/Library/Extensions/VBoxUSB.kext"
@adrienbrault
adrienbrault / 1_hateoas.md
Last active December 18, 2015 18:30
Hateoas php library features ideas/wishlist

I'm about to start writing a new php library for hateoas stuff. Here are my thoughts about what features it should have. If you have comments/suggestions/ideas/requests/whatever, please comment the gist.

  • php 5.3 library
  • hooking into the jms serializer
  • support multiple hateoas "formats/standards" (hal, etc)
  • configuration layer
    • static configuration: php, yaml, annotations, extension api for other libraries (being cached)
    • dynamic configuration, attach configuration to an object
@Turin86
Turin86 / WSSoapClient.php
Last active April 24, 2023 19:37 — forked from johnkary/WSSoapClient.php
WS-Security for PHP SoapClient
<?php
/**
* This class can add WSSecurity authentication support to SOAP clients
* implemented with the PHP 5 SOAP extension.
*
* It extends the PHP 5 SOAP client support to add the necessary XML tags to
* the SOAP client requests in order to authenticate on behalf of a given
* user with a given password.
*
@tystr
tystr / forms.xml
Created January 18, 2013 05:47
An example of symfony2 forms as services
<parameters>
<parameter key="my_bundle.my_model.form.type.class">My\Bundle\RestBundle\Form\Type\MyModelFormType</parameter>
<parameter key="my_bundle.my_model.form.handler.class">My\Bundle\RestBundle\Form\Handler\MyModelFormHandler</parameter>
</parameters>
<services>
<service id="my_bundle.my_model.form.type" class="%my_bundle.my_model.form.type.class%"/>
<service id="my_bundle.my_model.form" factory-method="create" factory-service="form.factory" class="Symfony\Component\Form\Form">
<argument type="service" id="my_bundle.my_model.form.type"/>
</service>
@havvg
havvg / JasmineHandler.php
Created October 31, 2012 16:57
Symfony2 + Jasmine = JasmineHandler
<?php
namespace Ormigo\Tests;
use Symfony\Component\Templating\EngineInterface;
use Symfony\Component\HttpFoundation\Response;
class JasmineHandler
{
protected $templating;
@makasim
makasim / gist:3720535
Last active June 26, 2017 06:32
form partial bind
<?php
namespace Foo\CoreBundle\Form\EventListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
use Symfony\Component\Form\FormInterface;
/**
* Changes Form->bind() behavior so that it treats not set values as if they
@Thermionix
Thermionix / auth-basic.conf
Last active November 4, 2021 00:56
nginx reverse proxy for sickbeard, couchpotato etc.
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/htpasswd;
@merk
merk / Menu.php
Created May 7, 2012 03:15
Event driven menus
<?php
/*
* TODO: Copyright notices on Infinite Networks files.
*
* (c) Infinite Networks Pty Ltd <http://www.infinite.net.au/>
*/
namespace Infinite\MenuBundle\Menu;
@marijn
marijn / Example.php
Created April 3, 2012 16:53
An example on sorting Doctrine\Common\Collection\ArrayCollection elements
<?php
$collection = new Doctrine\Common\Collection\ArrayCollection();
// add objects to the collection that contain a getCreated method returning a DateTime instance
$iterator = $collection->getIterator();
$iterator->uasort(function ($first, $second) {
if ($first === $second) {