Skip to content

Instantly share code, notes, and snippets.

View BIGjuevos's full-sized avatar
:shipit:

Ryan Null BIGjuevos

:shipit:
View GitHub Profile
@BIGjuevos
BIGjuevos / keybase.md
Created April 24, 2018 03:07
my keybase

Keybase proof

I hereby claim:

  • I am BIGjuevos on github.
  • I am bigjuevos (https://keybase.io/bigjuevos) on keybase.
  • I have a public key whose fingerprint is 37DB 92EB C188 7C6B F496 1CBD 5553 9E66 5F29 463E

To claim this, I am signing this object:

@BIGjuevos
BIGjuevos / pagination.php
Created April 28, 2016 21:10
Pagination Algo in PHP
<?php
$pageCount = ceil( $counts['paginated'] / 10 );
$low = max(0, $currentPage - 5);
if ( $pageCount > 10 ) {
$high = $currentPage + 5;
} else {
$high = $pageCount - 1;
}
$high = (int)$high;
$pages = [];
@BIGjuevos
BIGjuevos / xunit-with-cdata-sample.xml
Created March 25, 2016 23:43
refs #824 n1k0 casperjs
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE casperjs PUBLIC "-//CasperJS//XUnit Test Results" "testsuites">
<testsuites time="0">
<testsuite name="foo" tests="1" failures="1" errors="1" time="0" timestamp="2016-03-25T23:42:34.309Z" package="foo">
<testcase name="foo bar baz" classname="foo" time="0">
<failure type="footype">
<![CDATA[<b>foo</b><i>bar</i> and <a href=''>baz</a>]]>
</failure>
</testcase>
<error type="foo">

Keybase proof

I hereby claim:

  • I am bigjuevos on github.
  • I am bigjuevos (https://keybase.io/bigjuevos) on keybase.
  • I have a public key whose fingerprint is B798 5577 06A3 03F5 39E4 4965 4EC2 910F 97D3 91CD

To claim this, I am signing this object:

@BIGjuevos
BIGjuevos / Context.php
Created May 7, 2013 20:23
Ruler replacement for context that doesn't rely on Pimple.
<?php
namespace Ruler;
class Context implements \ArrayAccess
{
private $values = array();
public function __construct(array $values = array())
{