Skip to content

Instantly share code, notes, and snippets.

Jamie Spittal Spittal

Block or report user

Report or block Spittal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Spittal
Spittal / Format Time Angular Filter
Created Jul 31, 2014
Angular Time Filter that takes milliseconds and returns it as full minutes and seconds. For example: 60000 = 1:00, 6000000 = 100:00, 6000000 = 1:40:00 (withHour = true)
View Format Time Angular Filter
.filter('formatTime', function() {
return function(milliseconds,withHour) {
var seconds = parseInt((milliseconds/1000)%60);
var minutes = parseInt((milliseconds/(1000*60))%60);
var hours = parseInt((milliseconds/(1000*60*60))%24);
var out = "";
minutes = (parseInt(minutes) + (60 * parseInt(hours)));
minutes = (minutes < 10) ? "0" + minutes : minutes;
seconds = (seconds < 10) ? "0" + seconds : seconds;
View Laravel Cron Pod
// Dockerfile
FROM sbvr/laravel-alpine
# Cron Scheudler conf https://laravel.com/docs/5.4/scheduling#introduction
COPY schedule-cron /var/spool/cron/crontabs/root
RUN chmod +x /var/spool/cron/crontabs/root
COPY cron.ini /etc/supervisor.d/
CMD [ "supervisord", "-n" ]
@Spittal
Spittal / docker-compose.yaml
Created Sep 15, 2018
Docker compose file from SBVR
View docker-compose.yaml
version: '3'
services:
fpm:
image: sbvr/laravel-fpm:2.1.2
volumes:
- app:/var/www
networks:
- appnet
worker:
@Spittal
Spittal / docker-compose.override.yaml
Created Sep 15, 2018
Docker Compose override from Springboard VR
View docker-compose.override.yaml
version: '3'
services:
fpm:
volumes:
- ./:/var/www
environment:
- OPCACHE_ENABLED=0
worker:
volumes:
@Spittal
Spittal / Skyrocket Notes App Technical.md
Last active Dec 30, 2018
Skyrocket Notes App Technical Overview
View Skyrocket Notes App Technical.md

Skyrocket Notes

Create a simple 'Note Taking' application on the web using the technologies of your choosing.

We want you to feel like you can be creative and comfortable during this task. So, take the time you need to develop this. Share it with us either on Github as public repo or as a .zip archive. Remember that you can use whatever tools you would like to complete this task, just make sure you leave us instructions on how to run the application.

View keybase.md

Keybase proof

I hereby claim:

  • I am Spittal on github.
  • I am spittal (https://keybase.io/spittal) on keybase.
  • I have a public key whose fingerprint is 2CFF 98C7 00A0 088F DF7D E82A 0AD2 3DFE 3AE2 B349

To claim this, I am signing this object:

View Ts to JS.ts
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { FormGroup, FormControl } from '@angular/forms';
import { Observable } from 'rxjs';
import { FlashService } from '../../core';
import { AdminService } from '../admin.service';
export class AdminUserIndexComponent implements OnInit {
@Spittal
Spittal / obersavbles.ts
Created Aug 24, 2016
Why Observables are amazing
View obersavbles.ts
import { Injectable } from '@angular/core';
import { Observable, ReplaySubject, Subscription } from 'rxjs';
import { SlideAnimator } from './slide-animator';
import { SlideObservables } from './slide-observables';
import { SlideHelper } from './slide-helper';
import {
SlideServiceConfig,
SlideEventEnd,
SlideEventStart,
SlideEvent,
View formbuilder.ts
import { Injectable } from '@angular/core';
import {
Validators,
Control,
ControlGroup
} from '@angular/common';
import { ValidationHelper } from
'../../../../common/helpers/validation.helper';
View borm_builder.ts
import { Injectable } from 'angular2/core';
import {
FormBuilder,
Validators,
Control,
ControlGroup }
from 'angular2/common';
import { ValidationHelper } from
'./validation-helper';
You can’t perform that action at this time.