Skip to content

Instantly share code, notes, and snippets.

View col's full-sized avatar
👨‍💻

Col col

👨‍💻
  • Jiva Ag
  • Melbourne, Australia
View GitHub Profile
@col
col / AnimatedBackground.swift
Last active May 23, 2024 02:21
SwiftUI Animated Blur Background
//
// AnimatedBackground.swift
// Playground
//
// Created by Colin Harris on 23/5/24.
//
import SwiftUI
struct AnimatedBackground: View {
@col
col / manifest.yaml
Last active September 20, 2019 14:37
Faktory K8s Deployment / Service Definitions (debugging only)
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "3"
creationTimestamp: "2019-09-09T08:15:43Z"
generation: 3
labels:
app.kubernetes.io/instance: faktory
app.kubernetes.io/managed-by: Tiller
# Redis Notes
*Config Path:* `/etc/redis/redis.conf`
Configure Slave:
```
redis-cli -h <host or IP> SLAVEOF <master ip> 6379
```
@col
col / Postgres_notes.md
Last active May 3, 2019 01:55
Postgres Notes

Postrgres Notes

hba config

sudo nano /etc/postgresql/11/main/pg_hba.conf
> host    all    all    x.x.x.x/xx    md5
psql -U postgres
> SELECT pg_reload_conf();
@col
col / gcloud_kubectl_notes.md
Last active April 8, 2019 08:39
GCloud / Kubectl / Helm Notes

GCloud / Kubectl Notes

GCloud

Connect to the correct project

gcloud config list

gcloud projects list
@col
col / Elasticsearch_Notes.md
Last active April 24, 2019 07:42
Elasticsearch Notes

Elasticsearch Notes

Useful Endpoints

curl http://<host>:9200/_cat/health
curl http://<host>:9200/_cluster/state?pretty
curl http://<host>:9200/_nodes/stats/process?pretty
{
"bridge": {
"name": "Homebridge",
"username": "",
"port": 51826,
"pin": ""
},
"description": "My test homebridge config",
@col
col / README.md
Last active March 28, 2018 09:57
Building a golang Telegram bot

Building a golang Telegram bot

I've decided to dive into golang. I usually learn best when I try to build something so I've decided to re-write a Telegram bot I created a few years ago called the WhosInBot. It gets used by quite a few groups here in Singapore ano who know where else. I've had a few issues with the server it's running on recently so the idea of converting it to an AWS Lambda function (which recently released support for golang!) was appealing.

I've had some experience using the serverless framework in the past and found it pretty nice so I thought I'd start there.

Links:

```
CREATE ROLE postgres WITH LOGIN PASSWORD '';
ALTER ROLE postgres SUPERUSER;
ALTER ROLE postgres CREATEDB;
ALTER ROLE postgres CREATEROLE;
```
Reference:
https://www.codementor.io/engineerapart/getting-started-with-postgresql-on-mac-osx-are8jcopb
@col
col / setup_elixir_app_on_travis_ci.md
Last active July 4, 2020 17:46
Configure Elixir app on Travis CI

Configure Elixir app on Travis CI

Setup Build

  1. Create .travis.yml file in the base dir
  2. Enter the following content:
language: elixir
elixir:
 - 1.2