Skip to content

Instantly share code, notes, and snippets.

View msmyers's full-sized avatar

Michael Smyers msmyers

View GitHub Profile
@Ro5s
Ro5s / RestrictedTokenFactory.sol
Created September 3, 2021 16:33
permissioned factory for erc20 tokens with an admin set on construction
/// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
/// @notice Basic ERC20 implementation.
contract Token {
string public name;
string public symbol;
uint8 constant public decimals = 18;
uint public totalSupply;
mapping(address => uint) public balanceOf;
@shreyasssk
shreyasssk / signing-keys.md
Last active May 2, 2024 08:21
Docker Image Signing

Signing Docker Images

For this demo I will be using a simple hello-world docker image, and tag it as shreyasssk/signatures:1

This creates a digital signature.

$ docker trust key generate key1

This command creates a .pub key in the directory where the

@RichardBronosky
RichardBronosky / README.md
Last active December 1, 2023 08:19
Using cloud-init for cloudless provisioning of Raspberry Pi

Installing cloud-init on a fresh Raspbian Lite image

This is a work in Progress!

Purpose

This mainly demonstrates my goal of preparing a Raspberry Pi to be provisioned prior to its first boot. To do this I have chosen to use the same cloud-init that is the standard for provisioning servers at Amazon EC2, Microsoft Azure, OpenStack, etc.

I found this to be quite challenging because there is little information available for using cloud-init without a cloud. So, this project also servers as a demonstration for anyone on any version of Linux who may want to install from source, and/or use without a cloud. If you fall into that later group, you probably just want to read the code. It's bash so everything I do, you could also do at the command line. (Even the for loop.)

@kekru
kekru / Docker connect to remote server.md
Last active May 16, 2024 16:23
Connect to another host with your docker client, without modifying your local Docker installation

Run commands on remote Docker host

This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.

Enable Docker Remote API

First be sure to enable the Docker Remote API on the remote host.

This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.

"""Hoverable Behaviour (changing when the mouse is on the widget by O. Poyen.
License: LGPL
"""
__author__ = 'Olivier POYEN'
from kivy.properties import BooleanProperty, ObjectProperty
from kivy.core.window import Window
class HoverBehavior(object):
@voxxit
voxxit / USING-VAULT.md
Last active July 7, 2022 03:02
Consul + Vault + MySQL = <3
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200

Initializing a vault:

vault init
@phillipuniverse
phillipuniverse / ntp.conf
Last active November 8, 2022 14:40
Set up NTP with Ansible, dedicating one as a timelord
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable