Skip to content

Instantly share code, notes, and snippets.

Tyrell Perera tyrell

Block or report user

Report or block tyrell

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
@tyrell
tyrell / smb.conf
Last active Jan 6, 2018
This is a default Samba confit from OpenElec and is an excellent template to get a NAS going with Raspberry Pi.
View smb.conf
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2017 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
@tyrell
tyrell / a-running-minishift-with-metrics.md
Last active Mar 9, 2019
Running Minishift with Hawkular Metrics Installed
View a-running-minishift-with-metrics.md

Introduction

A minishift openshift cluster can be created with cluster metrics installed. Although I couldn't find a way to add metrics to an already created minishift VM instance, the steps below helped to get a new instance up and running easily.

Steps

Step 1 - Initialise minishift with metrics.

Create a fresh minishift VM with an openshift cluster using the below command. The --metrics parameter is the only additional thing I had to provide for minishift to start installing cluster metrics and Hawkular.

 $minishift start —metrics
@tyrell
tyrell / django-postgresql-persisted-on-openshift.md
Last active Apr 3, 2017
Django + PostgreSQL (Persisted) on Openshift
View django-postgresql-persisted-on-openshift.md

Introduction

The steps below assume that you are using minishift (https://github.com/minishift/minishift) to run an Openshift cluster locally.

Prefereably, these steps need to be carried out before initiating an application with the template above. If not, the PostgreSQL database pod will not start up and you will have to re-deploy the PostgreSQL pod after carrying out the steps below. It's not a major problem. But why panick unnecessarily? :)

Step 1 : Add Django with PostgreSQL 'persistent' template to Openshift

The Django persistent template can be found at https://github.com/openshift/django-ex

@tyrell
tyrell / Dockerfile
Created May 19, 2016 — forked from dceejay/Dockerfile
Dockerfile for Node-RED
View Dockerfile
# Dockerfile for Node-RED - pulls latest master code from git
# Use the node.js v0.10.36 engine
FROM node:0.12-slim
MAINTAINER ceejay
# download latest stable node-red
RUN npm install -g node-red
# use external storage for the user directory
VOLUME /root/.node-red
@tyrell
tyrell / docker-install-rpi3.md
Last active Jun 22, 2019
Installing latest Docker on a Raspberry Pi 3
View docker-install-rpi3.md

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/

@tyrell
tyrell / git.migrate
Last active Aug 29, 2015 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
View git.migrate
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
View devops-cheatsheet.md

Permission Cheat Sheet

You will use this one a lot in Wordpress :P

   chown -R www-data:www-data ./
   // set the proper owner
You can’t perform that action at this time.