Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Toasterson's full-sized avatar

Till Wegmüller Toasterson

View GitHub Profile
@Toasterson
Toasterson / main.dart
Last active August 29, 2015 14:19
Dart cant calculate 007 times 100
main() {
List<double> vals = const[
0.07,
0.08,
0.17,
0.017,
0.072,
0.007,
0.00725,
0.72,
@Toasterson
Toasterson / solaris_zone.yaml
Last active September 14, 2016 09:22
Solaris Zone Ansible Sample with sysding
tasks:
- name: Zone Dataset
zfs: "name=rpool/SHARED/zones/{{ zone_name }} state=present mountpoint={{ zone_path }}"
- name: Zone VNIC
dladm_vnic: "name={{ zone_vnic }} link=stub0 state=present"
- name: Zone creation
solaris_zone:
name: "{{ zone_name }}"
state: present
path: "{{ zone_path }}"
module code.gitea.io/gitea
require (
code.gitea.io/git v0.0.0-20190411170847-63b74d438b29
code.gitea.io/sdk v0.0.0-20190303183416-e4effe4df2b8
git.wegmueller.it/toasterson/go-billy v4.2.0+incompatible // indirect
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/PuerkitoBio/goquery v0.0.0-20170324135448-ed7d758e9a34
github.com/RoaringBitmap/roaring v0.4.7 // indirect
github.com/Unknwon/cae v0.0.0-20160715032808-c6aac99ea2ca
@Toasterson
Toasterson / main.go
Created April 5, 2020 13:59
registry custom main file
package main
import (
"github.com/docker/distribution/registry"
_ "github.com/docker/distribution/registry/auth/htpasswd"
_ "github.com/docker/distribution/registry/auth/token"
_ "github.com/docker/distribution/registry/proxy"
_ "github.com/docker/distribution/registry/storage/driver/azure"
_ "github.com/docker/distribution/registry/storage/driver/filesystem"
@Toasterson
Toasterson / service_bundle.xsd
Created April 15, 2020 13:37
illumos smf converted to xsd
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
CDDL HEADER START
The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.
@Toasterson
Toasterson / FRAOSUG-Cloud_Init-2021-05-18.org
Last active May 22, 2021 23:16
Presentation in FRAOSUG on the 18th of Mai 2021

Was ist es?

  • Dateiformat zum Automatisieren von Installationen in einer Cloud Umgebung
  • Script ausfuehrungs umgebung nach firstboot
  • Framework zum custom images vorbereiten (appliance vendor)

Wo findet man das normalerweise?

  • Cloud Umgebungen AWS, Azure, DigitalOcean, OpenStack, Alibaba…

Konzepte

  • Datasources
  • Metadata
  • userData
diff --git a/components/developer/samurai/Makefile b/components/developer/samurai/Makefile
index e9534f9d0..17a5cafcc 100644
--- a/components/developer/samurai/Makefile
+++ b/components/developer/samurai/Makefile
@@ -33,6 +33,6 @@ include $(WS_MAKE_RULES)/common.mk
COMPONENT_BUILD_ENV += CC="/usr/bin/gcc"
COMPONENT_BUILD_ARGS += CC="/usr/bin/gcc"
-COMPONENT_INSTALL_ARGS += PREFIX=$(PROTOUSRDIR)
+COMPONENT_INSTALL_ARGS += PREFIX=/usr DESTDIR=$(PROTO_DIR)
@Toasterson
Toasterson / README.md
Last active September 28, 2022 15:49
illumos gate forking and upstreaming Guide

illumos gate forking and upstreaming Guide

This guide is intended to get people started to Organise and maintain forks of illumos-gate similar to illumos-omnios or illumos-joyent. While the reasons one might want to make a fork might be many or how long that fork should exist, it is not in the scope of this guide to give information on why one should do this. It is assumed this reasoning has already happened and the reader wants to maintain a temporarily or full fork. All steps can be done with the GitHub CLI aswell but since that does not compile on illumos yet, it is left out of this guide.

Starting the fork.

To start the fork with purely git, use github's fork button. Then Clone the new fork. replace my username toasterson

The Gist of things we should have in illumos-rs

When we make applications and libraries interacting with illumos there are a couple of common things everybody needs to do. On one hand operating the Systems tools to manage things like links but also to edit and manage files. Configuration management is out of scope for this library but some of the parts of it should have idempotent components (the Rust Standard library already has the others and we use those when needed)

When implmeneting some of these it will initially need a need that justifies it. But once that person has done it and contributed their work we will see others making application because it gets easier.

This instructions are temporary and will later be simplified once we provide libstd and libc precompiled and as target installable via packages. But for now it outlines the process needed to get a standard rust compiler to compile unknown illumos arch combination like sparcv9-unknown-illumos aarch64-unknown-illumos and riscv64-unknown-illumos

Note: if your crate needs an external C Library you will have to fiddle with it a bit to properly set the include and cross build directives that crate supports.

  1. Get Rustup via the normal channels (goto https://rustup.rs copy and paste OSX instructions)
  2. Install Nightly toolchain
  3. print an already existing illumos rustc target and adjust to the target CPU rustc +nightly -Z unstable-options --target=aarch64-unknown-linux --print target-spec-json
    1. check other OS's spec files for that CPU to see what is OS specific (most) and what is CPU specific
    2. use https://llvm.org/docs/LangRef.html#data-layout to adjust data-layout key according to platfo