Skip to content

Instantly share code, notes, and snippets.

View jacobsantos's full-sized avatar

Jacob Santos jacobsantos

View GitHub Profile
@jacobsantos
jacobsantos / example.php
Last active December 16, 2015 02:09 — forked from amkaos/gist:5357240
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
@jacobsantos
jacobsantos / describe1.php
Created August 12, 2014 15:00
Describe function with example description and action
<?php
describe(
// The description of the specification.
'the describe function needs to have callable and context',
// All of the options and tests are contained within this closure.
// The closure or invoke object must accept no arguments, because none will
// be given when called.
function() {}
);
@jacobsantos
jacobsantos / java-interface-presentation
Last active August 29, 2015 14:10
Basic Java Interface
public interface ISomething {
public void doSomething();
}
protocol SomethingProtocol {
public doSomething();
}
@jacobsantos
jacobsantos / CacheDataInterface.php
Last active August 29, 2015 14:24
WordPress Cache Refactoring Example
<?php
interface CacheDataInterface {
public function setIndex($name, $group = '');
public function index();
public function setData( $value );
public function data();
public function increment( $offset = 1 );
@jacobsantos
jacobsantos / EventStorageInterface.php
Created July 5, 2015 22:20
WordPress Plugin Refactoring Example
<?php
interface StorageInterface {
public function listen( $name, $listener, $priority = 10, $limitArguments = 1 );
public function hasListener( $name, $listener = null );
public function silence( $name, $listener, $priority = 10 );
<?php
$data = [1,1,1,1,2,2,2,2,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4];
$chunks = array_count_values($data);
$values = array_keys($chunks);
$used = array_combine($values, array_fill(0, count($values), 0));
$new_distribution = [];
$previous = null;

Notes

  1. EggHead has an actual name, but the community knows him as "Egghead" or EggHead as his monkier, so that will be used throughout. EggHead will not get timestamps, because he does not speak enough to warrant it and will be interrupted enough that it will be hard to track.
  2. The audio reference is from the YouTube video. The SoundCloud audio appears to be different and there seems to be edited from the video.
  3. Listening to the SoundCloud or iTunes has much less cringe than the video. It is recommended that you listen to the first half.

Intro

/bin/bash /tmp/php_excel-php7/libtool --mode=compile cc -I. -I/tmp/php_excel-php7 -DPHP_ATOM_INC -I/tmp/php_excel-php7/include -I/tmp/php_excel-php7/main -I/tmp/php_excel-php7 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/opt/libxl/include_c/ -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -c /tmp/php_excel-php7/excel.c -o excel.lo
mkdir .libs
cc -I. -I/tmp/php_excel-php7 -DPHP_ATOM_INC -I/tmp/php_excel-php7/include -I/tmp/php_excel-php7/main -I/tmp/php_excel-php7 -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/opt/libxl/include_c/ -I/usr/include/libxml2 -fstack-protector-strong -fpic -fpie -O2 -DHAVE_CONFIG_H -fstack-protector-strong -fpic -fpie -O2 -c /tmp/p
@jacobsantos
jacobsantos / Dockerfile
Last active December 8, 2016 16:26
PHP Excel Dockerfile using php:7.0-fpm
FROM php:7.0-fpm
RUN set -ex \
&& apt-get update && apt-get install -y \
curl \
g++ \
openssl \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \