Skip to content

Instantly share code, notes, and snippets.

<?php defined('SYSPATH') OR die('No direct access allowed.');
class arr extends arr_Core {
public static function is_assoc(array $array)
{
// Keys of the array
$keys = array_keys($array);
// If the array keys of the keys match the keys, then the array must
<?
// Ensure we're dealing with local
return (bool) filter_var($ip_address, FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_IPV4);
# default server
server {
listen 80;
server_name local.kohanaphp.com;
root /Volumes/Webserver/Checkout/projects/kohana/v3;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ index.php$uri;
<?php
$files = glob('/Users/wgilk/Desktop/calls/*.csv');
$data = array();
foreach ($files as $file)
{
$csv = fopen($file, 'r');
@shadowhand
shadowhand / custom.css
Created January 8, 2011 02:49 — forked from isaiahdw/gist:769660
Kohana Framework Forum Theme for Vanilla 2
body { background: #f1f8db; }
#Body {
margin: 15px 0 0;
overflow: visible;
padding: 0 15px;
position: relative;
width: auto;
}
<?php
require_once('Mustache.php'); // Ensure feature/higher-order-sections branch !!
class MyMustache extends Mustache {
public function name()
{
return "Luke";
}
@shadowhand
shadowhand / 0_reuse_code.js
Created May 17, 2014 00:43
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
import json
import os
import requests
GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN')
if GITHUB_TOKEN is None:
raise Exception('Missing GITHUB_TOKEN from os.environ')
# Starts server in current folder
tell application "Finder"
set currentDir to POSIX path of ((container of (path to me)) as text)
end tell
tell application "Terminal" to activate
tell application "Terminal"
do script ("cd '" & currentDir & "'")
@shadowhand
shadowhand / ddd_cqrs_event-sourcing_in_php.md
Created October 18, 2016 14:38 — forked from jsor/ddd_cqrs_event-sourcing_in_php.md
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD