Skip to content

Instantly share code, notes, and snippets.

View activity.sh
#!/bin/bash -e
function usage () {
echo "$1" duration oldest-branch … newest-branch
exit 1
}
function count_commits() {
log_args[0]="origin/$2"
if [ $# -eq 3 ]
@greg0ire
greg0ire / composer-test-my-pr
Last active Mar 25, 2019
How to quickly provide a markdown help test for people who want to test your PR
View composer-test-my-pr
#!/bin/bash
#
# Assumes you are in the directory of a Composer project, on the branch of your
# PR, and that the PR is on Github
function usage()
{
echo "Usage: $1 nickname"
echo "Example: $1 greg0ire"
exit 1
View pagination.md

Pagination

Pagination is the process of dividing a long list of results into easier to consume pages. By only loading one page at a time, memory is preserved. This applies to RDBMS result sets, collections of serialized items in an API, or listings in list views of simple CRUD applications. Although the needs are often the same, many libraries define their own objects, or even use plain arrays to represent a paginated result. As a result, projects consuming these libraries often end up defining many adapters for those many libraries.

@greg0ire
greg0ire / phpDocDuh
Created Jan 10, 2017
php doc : towards a minimum?
View phpDocDuh
<?php
/**
* @param A $a useful comment
* @param B $b useless comment
* @param C|null $c useful comment
*/
function muchDocumented(A $a, B $b, C $c = null)
{
}
View keybase.md

Keybase proof

I hereby claim:

  • I am greg0ire on github.
  • I am greg0ire (https://keybase.io/greg0ire) on keybase.
  • I have a public key whose fingerprint is 21EA 01EE 4666 524E 353F 72CE F302 26DD 290F CB25

To claim this, I am signing this object:

View gist:a4b1b515b5fb10803b11
Verifying that +greg0ire is my blockchain ID. https://onename.com/greg0ire