Skip to content

Instantly share code, notes, and snippets.

View wellfreire's full-sized avatar

Wellington Freire wellfreire

  • Germany – Berlin
View GitHub Profile
@mindplay-dk
mindplay-dk / session-life-cycle.md
Last active March 28, 2024 19:52
Complete overview of the PHP SessionHandler life-cycle

This page provides a full overview of PHP's SessionHandler life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and what you can expect will be called in your custom SessionHandler implementation.

Each example is a separate script being run by a client with cookies enabled.

To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().

@alganet
alganet / composer.json
Created June 15, 2013 16:42
Auth Basic with Respect
{
"name": "respect/samples-auth-basic",
"authors": [
{
"name": "Alexandre Gaigalas",
"email": "alexandre@gaigalas.net"
}
],
"require": {
"respect/rest": "0.5.x"
@alganet
alganet / RESTinPaaS.md
Created December 17, 2012 09:32
Um ensaio sobre REST e computação na nuvem.

REST in PaaS

Computação em Nuvem

O termo computação em nuvem ficou difícil de definir nos últimos anos. Não dá pra explicar o que ele é sem decorar um monte de letrinhas e conceitos. Decorar as letrinhas é legal, mas saber um pouco da história por trás delas é mais legal ainda. Prometo ser breve!

Virtualização

Tudo começou com virtualização. Se você não conhece o termo, vou dar uma boa definição que serve pra enrolar alguém numa conversa de bar: Com virtualização você pode rodar várias máquinas virtuais menores em uma única máquina real.

@davidrobert
davidrobert / gist:3932858
Last active April 17, 2022 05:03
Apps Android
* BusaoSP * (~20.000 instalações)
Aplicativo para encontrar pontos, ônibus e itinerários que passam em qualquer localização em São Paulo.
Código Fonte: https://github.com/caelum/onibus-android
Google Play: https://play.google.com/store/apps/details?id=br.com.caelum.ondeestaobusao.activity
* Calc PJ * (~2.000 instalações)
Aplicativo para cálculo dos tributos que incidem sobre uma nota fiscal de prestação de serviços.
Código-Fonte: https://github.com/SuelenGC/Calculadora-de-Tributos-PJ
Google Play: https://play.google.com/store/apps/details?id=br.com.suelengc.calctributospj
@alganet
alganet / exception_handlers_on_respect_rest.md
Created September 17, 2012 02:52
Exception Handlers on Respect\Rest

Exception Handlers on Respect\Rest

Hi! This is the first gist-post about a new feature on one of Respect components.

Let's say you're crazy and designed a Hello World API that throws errors randomly. Definitely most APIs could be classified as such:

<?php
$router = new Respect\Rest\Router;
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active July 7, 2024 13:22
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'