Skip to content

Instantly share code, notes, and snippets.

@lucab
lucab / libargon2.symbols
Created January 10, 2016 17:58
libargon2 exported symbols (20151206 tag)
libargon2.so.0 libargon2 #MINVER#
allocate_memory@Base 0~20151206
argon2_compare@Base 0~20151206
argon2_core@Base 0~20151206
argon2_hash@Base 0~20151206
argon2_thread_create@Base 0~20151206
argon2_thread_exit@Base 0~20151206
argon2_thread_join@Base 0~20151206
argon2_verify@Base 0~20151206
argon2d@Base 0~20151206
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
# On dirs
$ mkdir /tmp/bm-dir ; echo foo > /tmp/bm-dir/file ; sudo systemd-run -t -p ReadOnlyDirectories=/tmp/bm-dir/ sh -c 'echo bar >> /tmp/bm-dir/file; cat /tmp/bm-dir/file'
mkdir: cannot create directory ‘/tmp/bm-dir’: File exists
Running as unit run-r637b299dad174d8ba47b0a54df144b8b.service.
Press ^] three times within 1s to disconnect TTY.
/bin/sh: 1: cannot create /tmp/bm-dir/file: Read-only file system
foo
$ mkdir /tmp/bm-dir ; echo foo > /tmp/bm-dir/file ; sudo systemd-run -t -p InaccessibleDirectories=/tmp/bm-dir/ sh -c 'echo bar >> /tmp/bm-dir/file; cat /tmp/bm-dir/file'
[Unit]
Description=Etcd
After=network-online.target
[Service]
Slice=machine.slice
Delegate=true
ExecStartPre=-/opt/rkt/rkt gc --grace-period=0s
ExecStartPre=-/opt/rkt/rkt fetch --insecure-options=all http://repo.example.com/etcd-v2.3.6-linux-amd64.aci
@lucab
lucab / ignition-pr325.rs
Created March 13, 2017 09:01
schemafy-rs on coreos/ignition:pr-325
use one_or_many::*;
use serde_json;
# [ serde ( rename = "config-reference" ) ]
# [ derive ( Clone , PartialEq , Debug , Default , Deserialize , Serialize ) ]
pub struct ConfigReference {
pub source: Option<String>,
pub verification: Option<Verification>,
}
# [ serde ( rename = "ignition-config" ) ]
{
"name":"unused",
"tag":"unused",
"architecture":"amd64",
"fsLayers":[
{
"blobSum":"sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4"
},
{
"blobSum":"sha256:392a5de13a7f8bc3119896e525bae6d3436514fe26cc44ce03554965f0582b5b"
@lucab
lucab / torcx-list-profiles.yaml
Created August 7, 2017 13:59
[k8s/jobs] torcx - list profiles
apiVersion: batch/v1
kind: Job
metadata:
name: "torcx-userland"
spec:
template:
metadata:
name: "torcx-userland"
spec:
restartPolicy: Never
@lucab
lucab / torcx-remotes-ct.yaml
Created June 21, 2018 11:47
torcx-remotes-ct.yaml
# ct -pretty -in-file torcx-remotes-ct.yaml -out-file torcx-remotes-ign.json
ignition:
timeouts:
http_total: 25
storage:
files:
- path: /etc/torcx/remotes/net.core-os.lucab.integration/remote.json
filesystem: root
mode: 0640
contents:
@lucab
lucab / secmonkey_role_setup.py
Last active February 11, 2020 19:29
SecurityMonkey AWS role provisioning script
#!/usr/bin/env python
# Copyright 2014 Rocket-Internet
# Luca Bruno <luca.bruno@rocket-internet.de>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@lucab
lucab / fcos-ssh.json
Created July 29, 2020 12:28
FCOS pubkey lucab
{
"ignition": {
"version": "3.0.0"
},
"passwd": {
"users": [
{
"name": "core",
"sshAuthorizedKeys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCsWcDA7X5ZhXZ0Wil5aqJEvyuDkKuX1yBh0MhS4iFkODpS+yqhXUEdc/sDrk3zV+hHBh7nB9tlPzy9lp5A0cOXFpkzW79vdSZiZ94h2vg9aTgzi/D8NeOlfkCPgZjF6Mqa2g3kK0GhUzxrOY3d+GEK49ec9KRTLmk0qSx2XXwZx7ZdXNGetFR0XtuGKrK1BuK7KnkySdKgSFx4wdSuXznoi/WyhId+WpM2lRqEsol5yoRiHn4fzSR03NQG79dIIaSIvD0Rd9tSEWwJz/ZMGvGtkMYL3bqbG+4OQfDmhhjHER4S1chA+SlCvuqYcbxWB4VVWqMQhNBIOfhpFMoVCTJg9pw1bM7s/IHfmDDa0357nP8J3Ll6+MWoh6/ExrM8TQfZ8zLVgDUVktFIgE1Y88mLhM0obNWvPy1cKh+Ut9iIqsmnAmvChsU+/pJnmilCTZvOLJnxdBBpzVav2OnqtuWLaIYeZz1Bvc49ptujZvBiArsQBmnkMJDF2zmJxWjc8gDX3rPkMh+BWwXpSiI2ufrQNnzmlfdky6mxEy35wZvvC+YldM23XPZxuvqIR6GeQ4LtE0tLpY7TP/TayTcqxKcmrWZjZxKiEVn8eRYpGMUoYEBfHawZwcFJtzUSg8BySwpeLEzmlVn29qi7BRmFa8VDIvQChIeR7UmRCJvR5Ynltw== luca.bruno@coreos.com"