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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
function default_branch() | |
{ | |
printf "%s\n" "$(git remote show origin | grep "HEAD branch" | cut -d ":" -f 2 | xargs)" | |
} | |
function branch_metadata() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yes '-' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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) | |
{ | |
} | |
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:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +greg0ire is my blockchain ID. https://onename.com/greg0ire |