Skip to content

Instantly share code, notes, and snippets.

@borisguery
borisguery / api_errors.md
Last active February 20, 2018 10:28
HTTP Cache API Doc

Errors

There are currently 3 types of errors:

  • Server errors
  • Client errors
  • Forms validations errors

The Error object

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Alpha Component</key>
<real>1</real>
<key>Blue Component</key>
<real>0.0</real>
@borisguery
borisguery / INSTALL.md
Last active July 4, 2017 09:43
Disque install and systemd service configuration
$ cd /tmp
$ git clone https://github.com/antirez/disque.git
$ cd disque/
$ make
$ make test
$ sudo make install
$ sudo useradd -M -r disque
$ mkdir /etc/disque/
$ cp disque.conf /etc/disque/
angle
armoire
banc
bureau
cabinet
carreau
chaise
classe
clef
coin
#!/bin/bash
# Author: Boris Guéry <guery.b@gmail.com>
usage() {
cat <<EOF
usage: $0 <command> [-h] [-y] [-vvv] [-d] [<args>]
Currently supported commands are:
push Push current database data to S3
pull Download latest database snapshot and remove existing one
EOF
PHPUnit 5.1.4 by Sebastian Bergmann and contributors.
Bgy\Tests\Commanding\ConventionalCommandHandler
[x] Handle method properly handles command
Bgy\Tests\EventStore\OptimisticConcurrencyPolicy
[x] If expected revision is any it should not throw any exception
[x] If no stream or empty is expected but actual stream is not, optimistic concurrency should failed
[x] If a revision is expected but the stream does not exist, optimistic concurrency should failed
[x] If a revision is expected but different from the actual, optimistic concurrency should failed
-----BEGIN CERTIFICATE-----
MIIDmDCCAoCgAwIBAgIEaXZGFjANBgkqhkiG9w0BAQsFADB0MQswCQYDVQQGEwJVUzEZMBcGA1UE
CxMQVXNlcm5hbWU6IGJndWVyeTFKMEgGA1UEAwxBXyBETyBOT1QgSU5TVEFMTCB1bmxlc3MgdGhp
cyBpcyB5b3VyIGNlcnRpZmljYXRlIChKTWV0ZXIgcm9vdCBDQSkwHhcNMTUwNjA5MDk0MjM2WhcN
MTUwNjE2MDk0MjM2WjB0MQswCQYDVQQGEwJVUzEZMBcGA1UECxMQVXNlcm5hbWU6IGJndWVyeTFK
MEgGA1UEAwxBXyBETyBOT1QgSU5TVEFMTCB1bmxlc3MgdGhpcyBpcyB5b3VyIGNlcnRpZmljYXRl
IChKTWV0ZXIgcm9vdCBDQSkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC01TE6fnQP
VQtoHyI85tVe5YQzxBsS0ZKwRNr7bWGplku1GOZoSGuR8sgnqiK7vrWk7io6ESbiB8X4EXBSsABR
rkhrwSZINIdAoJ4+ZZVCTDTpxKFXbLbXZze8+xP8PD78HDEr4HxXcbBCAM0W5IwnyfdPMhJQ2ZcF
sE2PfJDHwJ5RJDPXHljZUDhDyu4ZGp5fEt0o6CuDfpOsStcPGiGhcKiXv3vFUN9gEKMATPGLUd8N
if [ -e /etc/apt/sources.list ] && grep -qai '^deb.*squeeze' /etc/apt/sources.list && ! grep -qai squeeze-lts /etc/apt/sources.list; then echo "
deb http://http.debian.net/debian/ squeeze-lts main contrib non-free
deb-src http://http.debian.net/debian/ squeeze-lts main contrib non-free
" >> /etc/apt/sources.list; fi; gpg --keyserver pgpkeys.mit.edu --recv-key 8B48AD6246925553; gpg -a --export 8B48AD6246925553 | apt-key add -; apt-get update; apt-get install bash; vi /etc/apt/sources.list
SELECT CONCAT(
'SELECT ', GROUP_CONCAT(DISTINCT CONCAT(K.CONSTRAINT_NAME, '.', P.COLUMN_NAME,
' AS `', P.TABLE_SCHEMA, '.', P.TABLE_NAME, '.', P.COLUMN_NAME, '`') ORDER BY P.ORDINAL_POSITION), ' ',
'FROM ', K.TABLE_SCHEMA, '.', K.TABLE_NAME, ' AS ', K.CONSTRAINT_NAME, ' ',
'LEFT OUTER JOIN ', K.REFERENCED_TABLE_SCHEMA, '.', K.REFERENCED_TABLE_NAME, ' AS ', K.REFERENCED_TABLE_NAME, ' ',
' ON (', GROUP_CONCAT(CONCAT(K.CONSTRAINT_NAME, '.', K.COLUMN_NAME) ORDER BY K.ORDINAL_POSITION),
') = (', GROUP_CONCAT(CONCAT(K.REFERENCED_TABLE_NAME, '.', K.REFERENCED_COLUMN_NAME) ORDER BY K.ORDINAL_POSITION), ') ',
'WHERE ', K.REFERENCED_TABLE_NAME, '.', K.REFERENCED_COLUMN_NAME, ' IS NULL;'
) AS _SQL
FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE K