Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AmyStephen
AmyStephen / TareikArtis.md
Last active September 24, 2015 17:28
Questions regarding Tareik Artis Shooting

Tareik Artis

My name is Amy Stephen. I am a long time Nebraska resident with questions for the media and Lincoln Police about the September 22, 2014, Tareik Artis shooting by the Metro Fugitive Task Force. I am a citizen sharing questions I have regarding the information shared - and not yet shared - on this shooting. I am not an attorney or a public official.

Condition

Question: What is Tareik condition? Is he still in critical condition? Has his family been able to visit him? Has his statement been taken? Have statements from the driver and other passenger been taken? Have they been arrested? If so, why? Please publish any available information from Tareik and those who were with him in the car.

Probable cause for detaining Tareik Artis

@AmyStephen
AmyStephen / Reflection.php
Last active August 29, 2015 14:05
Creates @Covers statements for class methods
<?php
$class = new ReflectionClass('Molajo\Controller\DateController');
$methods = $class->getMethods();
foreach ($methods as $method) {
echo ' * @covers ' . $method->class . '::' . $method->name . PHP_EOL;
}
@AmyStephen
AmyStephen / email.php
Last active August 29, 2015 13:57
What pattern does this use?
<?php
class Email implements EmailInterface
{
/**
* Email Handler
*
* @var object
* @since 1.0
*/
protected $handler;
@AmyStephen
AmyStephen / tabs.html
Created January 24, 2014 14:10
Foundation 5 - Tabs with embedded grid
<!DOCTYPE html>
<!--[if IE 8]>
<html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Molajo</title>
<link rel="stylesheet" href="/Css/normalize.css">
<?php
/**
* Cat Class
*
* @package Test
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @copyright 2013 Amy Stephen. All rights reserved.
*/
namespace Animal;
@AmyStephen
AmyStephen / wtf.php
Created October 7, 2013 22:37
How do you determine if a value is an Integer?
<?php
// Case 1 Produces:
// int_of_value: 0 is equal to value: dog
$value = 'dog';
$int_of_value = (int) $value;
if ($int_of_value == $value) {
echo 'int_of_value: ' . $int_of_value . ' is equal to value: ' . $value;
@AmyStephen
AmyStephen / bepositive.php
Last active July 6, 2018 13:10
In Defense of Positive Logic over Happy Path
<?php
/**
* Option 1: Happy Path (! $this)
*/
// 1. The world begins.
if (! $this) {
$result = 'No complaints. This is easy to understand and follow.';
@AmyStephen
AmyStephen / rename.php
Last active December 24, 2015 15:09
Quick and dirty rename of all files of one file extension to another (in this case, .html.php to .phtml)
<?php
$objects = new RecursiveIteratorIterator
(new RecursiveDirectoryIterator(__DIR__),
RecursiveIteratorIterator::SELF_FIRST);
foreach ($objects as $path => $fileObject) {
$use = true;
$file_name = '';
@AmyStephen
AmyStephen / Performance.sql
Created July 20, 2013 14:54
To use EXPLAIN or PROCEDURE ANALYSE in phpMyAdmin
// Normal query
SELECT a.id, a.title, b.category
FROM table a,
table b
WHERE a.category_id = b.category_id
// EXPLAIN http://dev.mysql.com/doc/refman/5.0/en/using-explain.html
EXPLAIN SELECT a.id, a.title, b.category
@AmyStephen
AmyStephen / NoContact.sql
Created July 11, 2013 16:00
Joomla Core Query withOUT contact
SELECT a.id, a.title, a.alias, a.introtext, a.checked_out, a.checked_out_time, a.catid, a.created, a.created_by, a.created_by_alias,
CASE WHEN a.modified = '0000-00-00 00:00:00' THEN a.created ELSE a.modified END AS modified, a.modified_by, uam.name AS modified_by_name,
CASE WHEN a.publish_up = '0000-00-00 00:00:00' THEN a.created ELSE a.publish_up END AS publish_up,a.publish_down, a.images, a.urls, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.xreference, a.featured, LENGTH(a.fulltext) AS readmore,
CASE WHEN badcats.id IS NOT NULL THEN 0 ELSE a.state END AS state,c.title AS category_title, c.path AS category_route, c.access AS category_access, c.alias AS category_alias,
CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author,ua.email AS author_email, parent.title AS parent_title, parent.id AS parent_id, parent.path AS parent_route, parent.alias AS parent_alias,ROUND(v.rating_sum / v.rating_count, 0) AS rating, v.rating_count AS rating_count,c.published,
CASE