Skip to content

Instantly share code, notes, and snippets.

# docker run -it -v "$PWD":/stable-diffusion/models/ldm/stable-diffusion-v1 ml
FROM ubuntu:22.04
# Updating Ubuntu packages
RUN apt-get update && yes|apt-get upgrade
# Adding git, bzip2 and wget
RUN apt-get install -y bzip2 git wget
# Install stable diffusion
RUN git clone https://github.com/basujindal/stable-diffusion.git && cd stable-diffusion
@craigmayhew
craigmayhew / windows11-mbr-to-gpt.md
Last active October 25, 2021 23:25
Windows 10->11 requires MBT be converted to UEFI GBT

Windows 11 requires disks use GPT.

A windows 10 to 11 upgrade will not be allowed to begin until this is solved. You can convert MBR to GPT using mbr2gpt built right into windows

Get to to the directory with mbrgpt.exe in cd C:\Windows\system32\

First we will validate the boot volume. i.e. the C drive mbr2gpt /validate /allowFullOS if validation looked successful then move on to the conversion mbr2gpt /convert /allowFullOS

@craigmayhew
craigmayhew / pin-ipfs-by-domain-dnslink.sh
Last active April 18, 2020 14:59
Pin domains locally from the address stored in each domains _dnslink DNS record

Keybase proof

I hereby claim:

  • I am craigmayhew on github.
  • I am craigmayhew (https://keybase.io/craigmayhew) on keybase.
  • I have a public key ASCC7jzTsgO0uHyl7IgKtrbxq1vRP7tH-3Z3d9iIh8WL4Qo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am craigmayhew on github.
  • I am fixthesource (https://keybase.io/fixthesource) on keybase.
  • I have a public key ASCLMCS2tZnahvtxX7o_qZA08pQqj-0u32sr25yljOwxAwo

To claim this, I am signing this object:

pragma solidity ^0.5;
contract owned {
constructor() public { owner = msg.sender; }
address payable owner;
modifier onlyOwner {
require(
msg.sender == owner,
"Only owner can call this function."
@craigmayhew
craigmayhew / ipfs-ubuntu.sh
Last active August 27, 2018 20:30
Install IPFS on Ubuntu 16.04
# download
wget https://dist.ipfs.io/go-ipfs/v0.4.17/go-ipfs_v0.4.17_linux-amd64.tar.gz
# install
tar xvfz go-ipfs_v0.4.17_linux-amd64.tar.gz
sudo mv go-ipfs/ipfs /usr/local/bin/ipfs
# start
ipfs daemon &
ipfs swarm peers
@craigmayhew
craigmayhew / peer-to-peer-git.md
Last active February 23, 2018 23:37
Remember, git is peer-to-peer

Enable public access to your local repo

Setup an alias

git config --global alias.serve "daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/"

Run the alias

git serve