Skip to content

Instantly share code, notes, and snippets.

View rob-balfre's full-sized avatar
🏳️‍🌈

Rob B rob-balfre

🏳️‍🌈
View GitHub Profile
@rob-balfre
rob-balfre / InstallationStack.md
Last active March 26, 2016 22:48 — forked from pjnovas/InstallationStack.md
Complete Install on Ubuntu Server of Nodejs + MongoDB + NGINX

##Ubuntu Server

NodeJS

sudo apt-get install g++ curl libssl-dev apache2-utils git-core make
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install -y nodejs
@rob-balfre
rob-balfre / DateTimePickerComponent.ts
Created April 3, 2017 08:06
angular (v4) wrapper for flatpickr
import { Component, ViewChild, AfterViewInit, Input, Output, EventEmitter, forwardRef } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
import * as Flatpickr from 'flatpickr';
@Component({
selector: 'app-date-time-picker',
templateUrl: './date-time-picker.component.html',
styleUrls: ['./date-time-picker.component.scss'],
providers: [
@rob-balfre
rob-balfre / click-outside.directive.ts
Created April 19, 2017 21:45
Angular Click Outside Directive
import { Directive, ElementRef, Output, EventEmitter, HostListener } from '@angular/core';
@Directive({
selector: '[appClickOutside]'
})
export class ClickOutsideDirective {
@Output() appClickOutside: EventEmitter<any> = new EventEmitter();
constructor(private _elementRef: ElementRef) {
}
@rob-balfre
rob-balfre / server.js
Created May 27, 2018 22:02
Example of Sapper using Passport
import express from 'express';
import passport from 'passport';
import {Strategy} from 'passport-github';
import compression from 'compression';
import sapper from 'sapper';
import serve from 'serve-static';
import {routes} from './manifest/server.js';
import App from './App.html';
import _ from '../SECRETS';
@rob-balfre
rob-balfre / babel.config.js
Last active October 13, 2020 08:49
Svelte webpack IE11
const presets = [
[
'@babel/preset-env',
{
targets: ['last 2 versions', 'ie >= 11'],
}
]
];
const plugins = [
import resolve from 'rollup-plugin-node-resolve';
import replace from 'rollup-plugin-replace';
import commonjs from 'rollup-plugin-commonjs';
import svelte from 'rollup-plugin-svelte';
import { terser } from 'rollup-plugin-terser';
import config from 'sapper/config/rollup.js';
import pkg from './package.json';
import alias from '@rollup/plugin-alias';
const path = require('path');