Skip to content

Instantly share code, notes, and snippets.

View nathanielread's full-sized avatar

Nathan Sandell nathanielread

  • E2open
View GitHub Profile
@nathanielread
nathanielread / stable_diffusion_scratch.txt
Last active September 2, 2022 20:21
Stable Diffusion
docker exec -it sd "cd /sd && python scripts/txt2img.py --prompt 'unicorn in a grassy field on a sunny day' --H 512 --W 512 --seed 27 --n_iter 2 --ddim_steps 50"
docker exec -it -w /sd sd bash -c "conda activate ldm; python scripts/txt2img.py --H 256 --W 256 --seed 27 --n_iter 1 --ddim_steps 50 --prompt 'unicorn in a grassy field on a sunny day in the winter around snow'"
docker exec sd bash -c "cd /sd; python scripts/txt2img.py --prompt 'unicorn in a grassy field on a sunny day in the winter around snow' --H 512 --W 512 --seed 27 --n_iter 2 --ddim_steps 50"
cat << EOF | docker exec -i sd bash
cd /sd
@nathanielread
nathanielread / nfs_server_client_setup.sh
Last active August 16, 2022 15:53
NFS and Samba server and client setting #broken
sudo apt install -y nfs-kernel-server nfs-common
sudo mkdir -p /mnt/nfs/{docker,nrs,desktop,e2opentm,e2opentms,mac,remotewin,snadell,ubuntuserver,myvegango}
sudo chown nrs:nrs -R /mnt/nfs/*
echo '/opt 100.64.0.0/24(rw,sync,no_subtree_check,no_root_squash)' | sudo tee -a /etc/exports
sudo exportfs -a
sudo systemctl restart nfs-kernel-server
sudo ufw allow in on tailscale0 to any
# sudo vi /etc/exports
# /opt 100.64.0.0/24(rw,sync,no_subtree_check,no_root_squash)
@nathanielread
nathanielread / ubuntu_server_static_ip.sh
Created July 25, 2022 13:34
Ubuntu Server Static IP
# CHANGE IP ADDRESS
sudo tee -a /etc/netplan/99_config.yaml > /dev/null <<EOF
network:
version: 2
renderer: NetworkManager
ethernets:
eth0:
dhcp4: false
addresses:
- 172.16.10.102/24
@nathanielread
nathanielread / download_all_user_gists_to_files_ruby.rb
Last active August 14, 2019 14:43
Download all user gists to files via ruby #ruby
#!/usr/bin/env ruby
# need to specificy the username and filepath variables, as well as GITHUBKEY env variable
require 'uri'
require 'net/http'
require 'JSON'
require 'open-uri'
responses = 30.times.map do |i|
url = URI("https://api.github.com/users/#{username}/gists?page=#{i + 1}&per_page=100")