This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
prefix="$HOME/.threefold" | |
echo "[+] prefix: $prefix" | |
echo "[+] creating default directories" | |
mkdir -p "${prefix}" | |
mkdir -p "${prefix}/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/sbin/openrc-run | |
# Copyright (c) 2007-2015 The OpenRC Authors. | |
# See the Authors file at the top-level directory of this distribution and | |
# https://github.com/OpenRC/openrc/blob/master/AUTHORS | |
# | |
# This file is part of OpenRC. It is subject to the license terms in | |
# the LICENSE file found in the top-level directory of this | |
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE | |
# This file may not be copied, modified, propagated, or distributed | |
# except according to the terms contained in the LICENSE file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis | |
import time | |
import json | |
""" | |
nodes = { | |
'minio': [ | |
{ | |
'host': '10.241.0.232', | |
'port': 6379, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
settings() { | |
rootdir="/export" | |
excludes="/dev /proc /sys /corex ${rootdir}" | |
ZFLIST_MNT="${rootdir}/flist" | |
ZFLIST_HUB="https://playground.hub.grid.tf" | |
# ZFLIST_BACKEND='{"host": "playground.hub.grid.tf", "port": 9910}' | |
ZFLIST_HUB_TOKEN=kiUTd9jRjgt7QB6lRh2bcpNiC2UqvTLI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: test | |
Umask: 0022 | |
State: S (sleeping) | |
Tgid: 21248 | |
Ngid: 0 | |
Pid: 21248 | |
PPid: 21247 | |
TracerPid: 0 | |
Uid: 1000 1000 1000 1000 | |
Gid: 1000 1000 1000 1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
00400000-00401000 r--p 00000000 103:02 288372 /tmp/test | |
Size: 4 kB | |
KernelPageSize: 4 kB | |
MMUPageSize: 4 kB | |
Rss: 4 kB | |
Pss: 4 kB | |
Shared_Clean: 0 kB | |
Shared_Dirty: 0 kB | |
Private_Clean: 4 kB | |
Private_Dirty: 0 kB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use redis::Commands; | |
use std::{ | |
fs::File, | |
io::{self, BufRead, BufReader}, | |
os::unix::io::FromRawFd, | |
}; | |
fn main() -> io::Result<()> { | |
let client = redis::Client::open("redis://10.241.0.232").unwrap(); | |
let r = client.get_connection().unwrap(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/ash | |
if [ -f /etc/ssh/ssh_host_rsa_key ]; then | |
# nothing to do, hackish way | |
sleep 10 | |
exit 0 | |
fi | |
echo "Setting up sshd" | |
mkdir -p /run/sshd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"context" | |
"fmt" | |
"io" | |
"sync" | |
// "github.com/threefoldtech/zos/pkg" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import random | |
import string | |
import urllib.parse | |
import pprint | |
import requests | |
import nacl.public | |
import nacl.signing | |
import base64 | |
from flask import Flask, request, redirect |