Skip to content

Instantly share code, notes, and snippets.

View redhoodie's full-sized avatar

Michael Brown redhoodie

  • Cymonz Ltd
  • Wellington, New Zealand
  • 15:36 (UTC +13:00)
  • X @redhoodie
View GitHub Profile
require 'date'
require 'active_support/time'
current_id = 123
starting_date = Date.new(2019,03,05)
times = [
[9, 0, 60],
[11, 30, 30],
#! /bin/sh
# /etc/init.d/vbox
#Edit these variables!
VMUSER=VMAdmin
VMNAME="cdb62186-7c30-4c25-a0b0-e4a32cfb0504"
BASEFOLDER=/home/VMAdmin/path/to/backups/
case "$1" in
start)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Cam">
<title>Oliver Bray Music</title>
<?php
include 'config.php';
error_reporting (E_ALL ^ E_NOTICE);
$post = (!empty($_POST)) ? true : false;
if ($post) {
$name = stripslashes($_POST['name']);
$email = trim($_POST['email']);
@redhoodie
redhoodie / config.json
Last active August 29, 2015 14:02
Pastors Co-op
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "#4C94FF",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 60%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#4C94FF",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
@redhoodie
redhoodie / newsdb.php
Created June 1, 2014 00:27
working :)
<?php
// login as student, only select privilege
$username = "Student";
$password = "hello123";
$hostname = "localhost";
//connect
$con = mysqli_connect($hostname, $username, $password, 'news');
/* check connection */
@redhoodie
redhoodie / config.json
Last active August 29, 2015 14:01
config.json for Dunedin Campus
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "#191919",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 60%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#2C5573",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
@redhoodie
redhoodie / config.json
Last active August 29, 2015 14:01
config.json Tours 2014
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "#6D6E71",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 60%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#4BA7AA",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",