Skip to content

Instantly share code, notes, and snippets.

@borisguery
borisguery / api_errors.md
Last active Feb 20, 2018
HTTP Cache API Doc
View api_errors.md

Errors

There are currently 3 types of errors:

  • Server errors
  • Client errors
  • Forms validations errors

The Error object

View bgy.itermcolors
<?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 Jul 4, 2017
Disque install and systemd service configuration
View INSTALL.md
$ 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/
View npm.log
> productreview@ build:dll /Users/bguery/Workspace/product-review.dev
> TARGET=client MAKE_DLL=1 node bin/build "admin"
Happy[js]: Version: 2.2.1. Using cache? yes. Threads: 4
Happy[js]: Loaded 0 entries from cache. (0 were stale)
Happy[js]: All set; signalling webpack to proceed.
Hash: 67df687e66cc7c9e9290
Time: 8398ms
chunk {0} vendor.js, vendor.js.map (vendor) 3.96 MB [entry] [rendered]
View dico.txt
angle
armoire
banc
bureau
cabinet
carreau
chaise
classe
clef
coin
View database_tool
#!/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
View vagrant-provisioning.log
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/xenial64'...
Progress: 50% Progress: 90% ==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/xenial64' is up to date...
==> default: Setting the name of the VM: ubuntu-xenial-16.04-cloudimg
==> default: Pruning invalid NFS exports. Administrator privileges will be required...
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) en0: Wi-Fi (AirPort)
2) en1: Thunderbolt 1
View -
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
View send-push
#!/usr/bin/env bash
GCM_API_KEY="AIzaSyC8SyQFokKQoLQo43245jUAa5PnfxFkt40"
GCM_TOKEN=$1
GCM_MESSAGE=$2
function usage () {
printf "usage: %s [token] <message>\n" $0
}
You can’t perform that action at this time.