Skip to content

Instantly share code, notes, and snippets.

View xkisu's full-sized avatar
🏳️‍⚧️

Keith Mitchell xkisu

🏳️‍⚧️
View GitHub Profile

This is mainly intended to document my steps for creating a custom Ubuntu install. It is primarally intended to be usful to me for reproducing when I did.

However it also goes over steps that could be usful for other users, so feel free to follow this guide to help you setup a custom Ubuntu enviroment.

Base OS

So as to have support for most programs and the easy ability to install packages, we'll use Ubuntu as the base.

As normal Ubuntu comes with a ton of software and the Unity DE which I don't wont, we'll use the Ubuntu command-line minimal install: https://help.ubuntu.com/community/Installation/MinimalCD

function (user, context, callback) {
var uuid = require("uuid");
user.app_metadata = user.app_metadata || {};
var promise = Promise.resolve(1);
if (!user.app_metadata.uuid) {
user.app_metadata.uuid = uuid();
@xkisu
xkisu / MongoProvider.js
Created April 16, 2018 06:46
MongoProvider for discord.js Commando
const SettingProvider = require('discord.js-commando/src/providers/base')
const mongoose = require('mongoose')
const Settings = mongoose.model('Setting', new mongoose.Schema({
guild: {
type: String,
required: true,
unique: true,
index: true
},
@xkisu
xkisu / skia_and_sfml.cpp
Created July 5, 2018 04:35
(July 2018) Example of using Skia with an SFML OpenGL window. Snippet extracted from a side project
#include <iostream>
#include "GrGLInterface.h"
#include "GrBackendSurface.h"
#include "GrContext.h"
#include "SkCanvas.h"
#include "SkColorSpace.h"
#include "SkSurface.h"
#include <SFML/Graphics.hpp>
@xkisu
xkisu / redash.job
Created January 6, 2021 01:58 — forked from spuder/redash.job
ReDash Nomad job #nomad
# Based on this documentation
# https://redash.io/help/open-source/setup#-Docker
# https://github.com/getredash/setup/blob/master/data/docker-compose.yml
job "redash" {
# region = ""
datacenters = ["dc1"]
type = "service"
@xkisu
xkisu / shortid.go
Last active May 17, 2021 21:56
A short unique ID generation method based on the ID generation used in Hashicorp Boundary and Vault
package shortid
import (
"crypto/rand"
"fmt"
"io"
)
// Base58 contains the encoding charset for base58 encoding.
//
@xkisu
xkisu / main.go
Created March 24, 2021 23:28
Restoer Docker Volumes From Folder of Tarfiles
package main
// set GOARCH=amd64
// set GOOS=linux
// go build -o compose-backup ./main.go
import (
"fmt"
"io"
"io/ioutil"
@xkisu
xkisu / docker-compose.yml
Created April 29, 2021 19:54
Basic Kratos Docker Compose setup
version: '3.7'
services:
kratos-migrate:
image: oryd/kratos:v0.6.0-alpha.1.pre.2
volumes:
- type: bind
source: ./config
target: /etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
@xkisu
xkisu / pagiantion.go
Created June 4, 2021 02:47
Golang Postgres Query Builder for GraphQL Relay-style Cursor-Based Pagination
package filters
import (
"fmt"
sq "github.com/Masterminds/squirrel"
)
// Pagination provides parameters for a pagination filter.
type Pagination struct {
@xkisu
xkisu / timestamp.go
Created June 28, 2021 02:15
gqlgen RFC3339 Timestamp Scalar
package scalars
import (
"errors"
"io"
"strconv"
"time"
"github.com/99designs/gqlgen/graphql"
)