Skip to content

Instantly share code, notes, and snippets.

View Ikke's full-sized avatar

Kevin Daudt Ikke

  • Netherlands
  • 08:36 (UTC +02:00)
View GitHub Profile
<?php
function upgrade_3_5_2b2() { //line 625
// fixing the effects of a previous bug affecting non-MyISAM users
if ( is_null( yarpp_get_option('weight') ) || //<-- this is one point where it errors out
!is_array( yarpp_get_option('weight') ) ) {
$weight = $this->default_options['weight'];
// if we're still not using MyISAM
if ( !yarpp_get_option('myisam_override') &&
$this->myisam_check() !== true ) {
unset( $weight['title'] );
@Ikke
Ikke / gist:4953348
Created February 14, 2013 14:59
Modules loaded after booting with sd card inserted
crc_itu_t 1364 1 firewire_core
firewire_core 53270 1 firewire_ohci
firewire_ohci 32102 0
jmb38x_ms 11234 0
memstick 7529 1 jmb38x_ms
mmc_block 19427 0
mmc_core 90305 3 mmc_block,sdhci,sdhci_pci
sdhci 28207 1 sdhci_pci
sdhci_pci 10997 0
@Ikke
Ikke / rc.lua
Created January 25, 2013 21:34
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "MPlayer" },
@Ikke
Ikke / test.c
Created December 25, 2012 21:40
void test_dll_dll_insert_before_insterts_item_before() {
t_dll *dll = dll_init();
dll_append(dll, "test1");
dll_append(dll, "test3");
t_dll_element *element = DLL_TAIL(dll);
dll_insert_before(dll, element, "test2");
A
|
c---d---e
/ \
a---b-------f
|
B
lowercase: Commits
uppercase: Refs
@Ikke
Ikke / MethodDelegator.php
Created November 14, 2012 22:22
DCI using php
<?php
Trait MethodDelegator
{
private $roles = array();
private $method_map = array();
public function delegate($class)
{
Feature List entries
In order to see what time I have logged
I want to get a list of entries for a particular day
Scenario: List all entries for a single day
Given The date is 2012-11-01
And The log contains the following entries:
| start_time | stop_time | description | date |
| 08:00 | 09:00 | A | 2012-10-31 |
| 08:00 | 09:00 | B | 2012-11-01 |
| key | value |
| start | 08:00 |
| end | 09:00 |
| description | Doing something |
| date | 2012-10-29 |
Feature: Log time
In order to keep my time
As a developer
I need to be able to add log entries
Scenario: Add a single time entry
Given I am a developer
When I enter the following into my time log:
"""
08:00 - 09:00 - Doing something
<?php
class BusinessLogic
{
private $repo;
public function __construct(User_Repository $repo)
{
$this->repo = $repol