Skip to content

Instantly share code, notes, and snippets.

View LupusMichaelis's full-sized avatar
🙈
Won't

Mickaël Wolff LupusMichaelis

🙈
Won't
View GitHub Profile
@MattKetmo
MattKetmo / FooCommand.php
Created September 7, 2012 11:46
[Console] Write into stdout and stderr
<?php
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\ConsoleOutputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Testcase: app/console foo > std 2> err
*/
@hvrauhal
hvrauhal / README.md
Last active May 23, 2022 05:51
Aggressively caching squid for http://registry.npmjs.org/

Caching http://registry.npmjs.org/ aggressively with squid

We run a lot of project in our automated test environment and they spend a lot of time doing npm install. One way to speed up npm install and hammer the registry a little less is to use the http-version of the registry and to pass the requests through a proxy.

However, the npm requests include an authorization-header and the responses come with an ETag and Cache-Control: max-age=60, so with default squid settings there is a lot of roundtrips to registry.npmjs.org that result in 304's.

This is what the requests look like once npm has cached the first set of responses:

GET http://registry.npmjs.org/sntp HTTP/1.1

@dataday
dataday / credentials-management.md
Last active October 22, 2023 06:47
docker + docker credential helpers + pass + gpg2 + coffee

Credentials Management

This guide describes setting out a credential storage mechanism that is shared between the root account, aka releasr, and jenkins account. It intends to support and persist access credentials that are needed when authenticating with external services, primarily Docker Hub, for users wishing to access remote Docker images as part of their containerised services.

The following diagram aims to describe the control flow this setup intends to support.

Credentials Management

This guide is a first, and a tad complicated sorry, pass at setting this up. It got us over the line for a couple of uses cases as well as working with automated build jobs.

@JoelQ
JoelQ / elm-types-glossary.md
Last active June 26, 2024 03:05
Elm Type Glossary

Elm Types Glossary

There's a lot of type terminology and jargon going around when discussing types in Elm. This glossary attempts to list some of the most common type terms along with synonyms, terms from other language communities, examples, and links to more detailed articles on each topic.

@cassidoo
cassidoo / DTN.md
Last active March 6, 2024 15:48
Deploy to Netlify Button

Insta-deploy templates to Netlify

Make a Deploy to Netlify button like this:

Deploy to Netlify

With this: