Skip to content

Instantly share code, notes, and snippets.

View haakym's full-sized avatar

Dominic haakym

  • London
View GitHub Profile

My Mac Setup

Settings

  • Date and Time > Show date
  • Sound > Show volume in the menu bar
  • Enable key repeat: defaults write -g ApplePressAndHoldEnabled -bool false or defaults write NSGlobalDomain ApplePressAndHoldEnabled -bool false
@haakym
haakym / automating-the-laravel-task-scheduler-on-windows.md
Created July 25, 2018 08:20
Automating the Laravel Task Scheduler on Windows from stillat.com

Automating the Laravel Task Scheduler on Windows

In this post we will look at how to automate the Laravel Task Scheduling system using the Windows Task Scheduler. The instructions presented were written for the Windows 10 Professional operating system, but should be easily transferable to other Windows operating system versions.

The Windows Task Scheduler service must first be enabled and running on the system. To verify this, open the Services application from the Administrative Tools panel on the specific Windows system you are using (alternatively you can run the services.msc application from the Run Window by using the Windows Key + R key combination). Locate the “Task Scheduler” entry and verify that it is running:

imgWindows Services

Now, start the Task Scheduler management application by selecting the “Task Scheduler” application from the Administrative Tools panel (alternatively you can run the taskschd.msc application from the Run Window by using the Windows Key + R key combination). The Task

#!/bin/bash
####
# Split MySQL dump SQL file into one file per table
# based on https://gist.github.com/jasny/1608062
####
#adjust this to your case:
START="/-- Table structure for table/"
# or
@haakym
haakym / cmd-mysql-dump-import.md
Last active August 24, 2018 08:56
Commands to import and dump a DB

Command Line MySQL Dump and Import

Dump

mysqldump -u username -p database > dump-file-path.sql

To export data only:

@haakym
haakym / Dockerfile
Created February 14, 2018 10:40
Dockerfile draft for Apache/PHP using Paul Redmond's tutorial - https://bitpress.io/simple-approach-using-docker-with-php/ with additions to get kerberos running
FROM php:7.1.8-apache
MAINTAINER Dominic Jones
COPY . /srv/app
COPY .docker/vhost.conf /etc/apache2/sites-available/000-default.conf
COPY .docker/kerberos.keytab /etc/kerberos.keytab
COPY .docker/krb5.conf /etc/krb5.conf
WORKDIR /srv/app
@haakym
haakym / install-guest-additions.md
Created February 7, 2018 10:27
Install guest additions with apt-get for vbox
@haakym
haakym / gwm-query.sql
Created December 21, 2017 13:27
Stupid query with group wise maximum
select
applications.id,
applications.reference_number,
applications.status,
applications.application_type,
applications.created_at,
applications.date_awarded,
applications.speciality,
@haakym
haakym / index.html
Created December 19, 2017 21:28
Word Assignment
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Word Assignment</title>
<style>
#wordAssignmentForm > div, .grammer-entities > div {
margin: 1em;
}
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class Bookings extends Migration
{
/**
* Run the migrations.
<?php
function array_build($array, $filter) {
foreach($array as $key => $value) {
unset($array[$key]);
$filter($key, $value);
$array[$key] = $value;
}
return $array;