Skip to content

Instantly share code, notes, and snippets.

@maxvt
maxvt / infra-secret-management-overview.md
Last active February 28, 2024 20:53
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@mickaelandrieu
mickaelandrieu / upgrade2.3-to-2.7.md
Last active April 26, 2022 11:56
Complete migration guide from Symfony 2.3 LTS to Symfony 2.7 LTS

From Symfony 2.3 to Symfony 2.7: the complete guide

Objectives

  • assume your code doesn't use any deprecated from versions below Symfony 2.3
  • update dependencies from 2.3 to 2.7
  • do not support "deprecated", be "Symfony3-ready"
  • list tasks component by component, bundle by bundle.
public function isNearlyEqualTo($value, $epsilon = null, $failMessage = null)
{
static::check($value, __METHOD__);
// see http://www.floating-point-gui.de/errors/comparison/ for more informations
$originalValue = abs($this->valueIsSet()->value);
$value = abs($value);
$diff = abs($originalValue - $value);
if ($epsilon === null) {
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

SELECT RELATION_ID(p.author) AS author_id
FROM Post AS p
@gyndav
gyndav / gist:2002661
Created March 8, 2012 18:51
Atoum VS PHPUnit
Avantages d'atoum sur PHPUnit :
# Sa rapidité
C'est "blazing fast". SERIOUSLY
# Simplicité de l'API
La documentation de PHPUnit est tellement longue qu'on s'y perd : la seule documentation dont j'ai eu besoin pour utiliser atoum, c'est son README et quelques posts du wiki parmi le bootstrap, le changement du namespaces pour les classes de tests et les mocks.
La lecture du code source pour les classes d'assert aussi.

Count how many variables have an underscore inside grep -E -r --include=*.php "[$][a-zA-Z\x7f-\xff]([a-zA-Z0-9\x7f-\xff]*_[a-zA-Z0-9\x7f-\xff]*)+" . | wc -l

Count how many variables have no underscore inside grep -E -r --include=*.php "[$][a-zA-Z\x7f-\xff][a-zA-Z0-9\x7f-\xff]*" . | wc -l

The regex is from : http://php.net/manual/en/language.variables.basics.php

@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@marcw
marcw / gist:957148
Created May 5, 2011 14:35
Steal the namespace + class in a file.
noremap <C-F9> gg/^namespace /e<CR>l"nyt;f\"Ny /^class /e<CR>l"Nye<ESC>
@marcw
marcw / gist:909430
Created April 8, 2011 07:20
Add twig search to ack-grep
alias ack='ack-grep --type-set twig=.twig'