Skip to content

Instantly share code, notes, and snippets.

View betweenbrain's full-sized avatar
🎯
Focusing

Matt Thomas betweenbrain

🎯
Focusing
View GitHub Profile
@betweenbrain
betweenbrain / node-goodies.md
Created March 4, 2016 19:34
Node.js Goodies
@betweenbrain
betweenbrain / Sophia's Purple Monster Smoothie.md
Created March 1, 2016 12:45
Sophia's Purple Monster Smoothie

1 cup each frozen blueberries, raspberries, milk.
1 Banana.
1 tablespoon ground Flax seed.
2 Tablespoons honey.
1 7oz tub Greek yogurt.

Blend and enjoy

@betweenbrain
betweenbrain / life.md
Created February 27, 2016 16:34
Slim 3 Middleware Execution Order Example (last in, first executed)
<?php

require 'vendor/autoload.php';

$app = new \Slim\App();

// Executed last as it's first in (FILE)
$app->add(function ($request, $response, $next) {
	// Execute the routes first
@betweenbrain
betweenbrain / gist:69e03984b94fb899900a
Last active January 16, 2020 20:58
Fix database encoding issue (export Latin-1, import UTF-8)
@betweenbrain
betweenbrain / shrink.sh
Last active January 8, 2016 02:29
Shrink VirtualBox Shell Script
# From http://vmassuchetto.github.io/2013/08/14/reducing-a-vagrant-box-size/
# Added here as the published version transform text to uppercase and breaks commands
#!/bin/sh
# Install guest additions - https://andrewelkins.com/2014/03/08/install-virtualbox-guest-additions-command-line/
## set the version number for easier updating
vbVersion=5.0.4
## Get Guest Additions ISO
@betweenbrain
betweenbrain / offset-utc.cs
Created December 22, 2015 15:14
C# Offset UTC by Int Console App
//Current UTC time
DateTime timeUtc = DateTime.UtcNow;
Console.WriteLine("UTC is {0}", timeUtc);
// UTC offset as a +/- integer
Console.WriteLine("Enter an +/- integr to offset UTC:");
int offset = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Int offset is {0}", offset);
// Format UTC offset as hh:mm:ss
@betweenbrain
betweenbrain / gist:044a4ee5b1590c4c54b0
Last active February 3, 2016 15:33
Restricted Joomla admin group

Creation

Child of registered

Global configuration

Admin Login allowed

Component level

Access Administration Interface: allowed
Edit: allowed

2 TBLS Chilli powder
1 TS Cumin
1 TS Paprika
1 TBLS Grlic powder
@betweenbrain
betweenbrain / mac-related-bookmarks.md
Last active October 13, 2015 14:38
A list of Mac related resources and links
@betweenbrain
betweenbrain / osx-10.10-apache.md
Created September 23, 2015 13:56
Mac OSX 10.10 Apache 2.4 Working Sites Directory

Create file /etc/apache2/users/{username}.conf

Add contents

<Directory "/Users/{username}/Sites/">
AllowOverride All
Options Indexes MultiViews FollowSymLinks
Require all granted
</Directory>