Skip to content

Instantly share code, notes, and snippets.

View tomcorbett's full-sized avatar

Thomas Corbett tomcorbett

View GitHub Profile
@tomcorbett
tomcorbett / PricingParityConverter.php
Last active May 17, 2024 21:53
Simple converter with hardcoded values for converting prices based on pricing parity data from ourworld in data
<?php
/**
* Using data from 2021 (latest) from here: https://ourworldindata.org/grapher/gdp-price-levels-relative-to-the-us?tab=table&time=latest
*/
class PricingParityConverter
{
const COUNTRY_MAP = [
'AF' => ['name' => 'Afghanistan', 'code3' => 'AFG'],
'AL' => ['name' => 'Albania', 'code3' => 'ALB'],
@tomcorbett
tomcorbett / digitalocean-gitlab-kubernetes-setup.md
Last active December 21, 2018 16:34
Brief Description of the steps I took to integrate GitLab with a Digital Ocean Kubernetes Cluster

GitLab setup for k8s

This instruction is how to get the required information for adding a kubernetes cluster into GitLab from DigitalOcean

Create your cluster

Create your cluster in DigitalOcean however you wish and once complete and ready, login to your GitLab project / group and use the following instructions.

Configure cluster ready for GitLab

For this you need to get the API URL, cert, token and make a service account for gitlab to use.

Note: Ensure that you check RBAC enabled when setting up the cluster

/**
* I took this code out of a controller I am using in Laravel so will have to fill in the blanks, include Neo4J etc.
*/
$client = new Client('localhost', '7474');
echo "<br /><br />Layer Created<br />";
$layer = $client->makeSimplePointLayer('test', 'latitude', 'longitude');
$layerSaved = $layer->save();
echo "<pre>";