Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
/** | |
* $.parseParams - parse query string paramaters into an object. | |
*/ | |
(function($) { | |
var re = /([^&=]+)=?([^&]*)/g; | |
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space | |
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );}; | |
$.parseParams = function(query) { | |
var params = {}, e; | |
while ( e = re.exec(query) ) { |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
# Inspired from http://blog.hio.fr/2011/09/17/doctrine2-yaml-mapping-example.html | |
MyEntity: | |
type: entity | |
repositoryClass: MyRepositoryClass | |
table: my_entity | |
namedQueries: | |
all: "SELECT u FROM __CLASS__ u" | |
# Class-Table-Inheritance |
<?php | |
use Behat\MinkExtension\Context\MinkContext; | |
require_once "PHPUnit/Extensions/Database/TestCase.php"; | |
class BaseFeatureContext extends MinkContext | |
{ | |
private $databaseTester; | |
public function getConnection() |
<?php | |
$mailer = $this->getContainer()->get('mailer'); | |
$message = new \Swift_Message(); | |
$message->setBody(''); | |
$message->setSubject(''); | |
$message->setTo(''); | |
$message->setFrom(''); |
# Convert the .cer file into a .pem file: | |
$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem | |
# Convert the private key’s .p12 file into a .pem file: | |
$ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem | |
# Finally, combine the certificate and key into a single .pem file | |
$ cat PushChatCert.pem PushChatKey.pem > ck.pem | |
# At this point it’s a good idea to test whether the certificate works. |
Lien vers l'offre OVH Public Cloud Object Storage : https://www.ovh.com/fr/cloud/storage/object-storage.xml
Pour utiliser l'API OpenStack Swift il faut récupérer des identifiants uniquement disponible dans l'interface Horizon
###1 - Créer un accès à Horizon
Dans l'espace client OVH : https://www.ovh.com/manager/cloud/login/
# This docker-compose.yml will run the Hypothes.is annotation server. | |
# (adapted from instructions here https://h.readthedocs.org/en/latest/INSTALL.html) | |
# | |
# Place this file in the working directory (clone of https://github.com/hypothesis/h) | |
# run with docker-compose up -d | |
# | |
# Now browse to Hypothes.is at http://192.168.59.103:8000/ and create an account | |
# You'll see the invitation email in Mailcatcher at http://192.168.59.103:1080/ | |
# Click that invitation link and log in on your local Hypothes.is | |
# And you are ready to annotate! |
#!/bin/bash | |
# Author: Erik Kristensen | |
# Email: erik@erikkristensen.com | |
# License: MIT | |
# Nagios Usage: check_nrpe!check_docker_container!_container_id_ | |
# Usage: ./check_docker_container.sh _container_id_ | |
# | |
# Edited by: Paulo José de Oliveira Salgado | |
# Email: paulo@technosoftware.com.br |