Write personal metadata to a global location

Overview

makemine

Write user information into a global location for desktop linux computers. Desktop owner information is often baked into parts of the desktop configuration. It's often convenient to have a local, central source of truth for the the user's full name, local user account email adddress. makemine takes the user info from a few possible sources and writes it to JSON, YAML and source files in /etc/makefile/[makefile.json, makefile,yaml, makefile.sh]. It's intended to be as simple as possible

NOTE: because it writes to etc, it has to be run with root privileges

Usage

If you just built your computer and you're logged in with the default root user, run makemine to be prompted for your data

sudo makemine
Full Name (ex. Firstly Lastly):
ttt yyy
local computer user account(ex. flastly):
tyyy
Email address (ex. [email protected]):
[email protected]
# NOTE: at the end, it silently writes your data to files in /etc/makemine
# then it conveniently composes a useradd command to create the local, non-root/non-default user for regular use
sudo useradd -m -d /home/tyyy -s /bin/bash -g sudo tyyy && passwd tyyy

If you do this kind of thing often, you can store your data in a local json file or public, url-accessible json file and makemine will iterate through your arguments to find it and use it rather than prompting you. It tries every argument as a file path, then as a URL. If none of them work, it will prompt. I've used github gists for this in testing, but anything should work. The debug option below shows the general flow

sudo build/current/darwin/amd64/makemine -debug ggg hhh
Password:
{"level":"debug","version":"0.0.2","time":"2021-11-28T13:19:27-05:00","message":"version: 0.0.2"}
{"level":"debug","version":"0.0.2","time":"2021-11-28T13:19:27-05:00","message":"Unable to get MyData from file: ggg"}
{"level":"debug","version":"0.0.2","time":"2021-11-28T13:19:27-05:00","message":"Unable to get MyData from url: ggg"}
{"level":"debug","version":"0.0.2","time":"2021-11-28T13:19:27-05:00","message":"Unable to get MyData from file: hhh"}
{"level":"debug","version":"0.0.2","time":"2021-11-28T13:19:27-05:00","message":"Unable to get MyData from url: hhh"}
Full Name (ex. Firstly Lastly):
rrr ttt
local computer user account(ex. flastly):
rttt
Email address (ex. [email protected]):
[email protected]
sudo useradd -m -d /home/rttt -s /bin/bash -g sudo rttt && passwd rttt
❯ sudo build/current/darwin/amd64/makemine ggg hhh
Full Name (ex. Firstly Lastly):
ttt yyy
local computer user account(ex. flastly):
tyyy
Email address (ex. [email protected]):
[email protected]
sudo useradd -m -d /home/tyyy -s /bin/bash -g sudo tyyy && passwd tyyy
You might also like...
used Terratest to write a test in GO for validating a Terraform module.

Terraform--Terragrant--Test used Terratest to write a test in GO for validating a Terraform module. will write a test for a Terraform module using Ter

This repository is where I'm learning to write a CLI using Go, while learning Go, and experimenting with Docker containers and APIs.

CLI Project This repository contains a CLI project that I've been working on for a while. It's a simple project that I've been utilizing to learn Go,

Scrapes tibber API and write to influxdb.

tibber-influxdb This will write data points to influxdb based on consumption and currentPrice. The points are written to influxdb with the timestamp f

Prometheus Remote Write Go client

promwrite Prometheus Remote Write Go client with minimal dependencies. Supports Prometheus, Cortex, VictoriaMetrics etc. Install go get -u github.com/

Repo CRUD - write e read in mongoDB
Repo CRUD - write e read in mongoDB

Meli User - userwrite Este repo é responsável por um cadastro onde teremos somen

W5-test-go - Write functions to pass the tests with the cases need to pass

Week 5 Assignment In this assignment, we expect to you write functions to pass t

Check-location - A golang service to check user location using their IP address

this is a golang service to check user location using their IP address. The purp

Ydb-go-yc-metadata - Helpers to connect to YDB inside yandex-cloud using metadata service

ydb-go-yc-metadata helpers to connect to YDB inside yandex-cloud using metadata

Personal-Solana-Wallet - Create your personal wallet on Solana blockchain

Personal Wallet on Solana using Go ♾️ Setting up environment Installation of Cob

Write controller-runtime based k8s controllers that read/write to git, not k8s

Git Backed Controller The basic idea is to write a k8s controller that runs against git and not k8s apiserver. So the controller is reading and writin

:pushpin: State of the art point location and neighbour finding algorithms for region quadtrees, in Go
:pushpin: State of the art point location and neighbour finding algorithms for region quadtrees, in Go

Region quadtrees in Go Region quadtrees and efficient neighbour finding techniques in Go Go-rquad proposes various implementations of region quadtrees

Go package for calculating the sunrise and sunset times for a given location

go-sunrise Go package for calculating the sunrise and sunset times for a given location based on this method. Usage To calculate sunrise and sunset ti

CLI Tool to remove unwanted connections from your Chia Node based on Geo IP Location.

chia-bouncer Tiny CLI tool to remove unwanted connections from your Chia Node based on the Geo IP Location (Country). The Tool is written in golang an

a sharded store to hold large IPLD graphs efficiently, packaged as location-transparent attachable CAR files, with mechanical sympathy

DAG store This README will be populated soon. In the meantime, please refer to the design document.

The canonical location of the Clusternet API definition.

apis Schema of the external API types that are served by Clusternet. Purpose This library is the canonical location of the Clusternet API definition.

RoutePlanner suggests circular walks or runs based on start location and desired distance.
RoutePlanner suggests circular walks or runs based on start location and desired distance.

RoutePlanner Backend This repository contains code that powers the routeplanner app. The app suggests circular walks or runs based on start location a

A Go library for calculating the sunset/sunrise time from a given location.

solar A library for calculating the sunset/sunrise time from a given location, as well as a function to calculate the whitepoint. It is a port of ~ken

A min-distance problem where it requires to find K nearest points to a specific location

Elizabeths-phaeton Elizabeths-Phaeton is a min-distance problem where it requires to find K nearest points to a specific location. Inorder to do so, w

Comments
  • One format doesn't fit all

    One format doesn't fit all

    The current version tried (hopelessly). to keep all of formats of the keys consistent. This isn't practical in JSON <-> ENV VAR or YAML <-> ENV VAR. Env vars are really expected to be all caps.

    Similarly, when using the yaml doc in ansible, ansible throws errors like these with camel case keys: Screen Shot 2021-12-04 at 6 14 53 AM

    Change the yaml file format to use the snake case that's more common to yaml/python/ansible fullName -> full_name email -> email localUser -> local_user

    opened by natemarks 0
Releases(v0.0.11)
Owner
Nate Marks
Nate Marks
Write controller-runtime based k8s controllers that read/write to git, not k8s

Git Backed Controller The basic idea is to write a k8s controller that runs against git and not k8s apiserver. So the controller is reading and writin

Darren Shepherd 50 Dec 10, 2021
This repo contains the metadata of EdgeX snaps

edgex-snap-metadata This repo contains the metadata of EdgeX snaps along with utility scripts to generate dummy snaps that can used to update the meta

Farshid Tavakolizadeh 0 Dec 6, 2021
The dataset metadata sharing platform beckend

portal-backend The dataset metadata sharing platform backend. How to contribute If you’re interested in contributing code, the best starting point is

data.LICENSE 5 Nov 17, 2022
Automatically create global & local Rate Limit in Istio, support EnvoyFilter versioning!

istio-ratelimit-operator Istio ratelimit operator provide an easy way to configure Global or Local Ratelimit in Istio mesh. Istio ratelimit operator a

Zufar Dhiyaulhaq 26 Oct 24, 2022
API for global CO2 measurements, powered by the Ribbit Network

Ribbit Network API (WIP) This repository contains the backend services supportin

Ribbit Network 1 Sep 12, 2022
⚔ Personal Golang starter kit with an engineer research perspective, expressjs developer friendly, and aims for rapid app development.

Goku (WIP; Author Only) ⚔ Personal Golang starter kit with an engineer research perspective, expressjs developer friendly, and aims for rapid app deve

Fauzan 1 Jan 6, 2022
Gottago - 💨 My personal development environment for golang.

gottago This repo contains my personal development environment for golang. Preparation Run docker app. Change the current working directory and execut

K.Utsunomiya 0 Jan 2, 2022
Euphoria - A personal library for manage EPUBs

What is Euphoria? Euphoria is an open-source personal EPUB book library which wa

Yufan Sheng 8 May 1, 2022
Making it easy to write shell-like scripts in Go

import github.com/bitfield/script What is script? script is a Go library for doing the kind of tasks that shell scripts are good at: reading files, ex

John Arundel 3.1k Nov 18, 2022
A set of tests to check compliance with the Prometheus Remote Write specification

Prometheus Remote Write Compliance Test This repo contains a set of tests to check compliance with the Prometheus Remote Write specification. The test

Tom Wilkie 102 Nov 7, 2022