This guide uses the domain your-domain.tld
and its www.
prefixed version.
It starts the rocket application on 127.0.0.1:1337
and as the user www-data
. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.
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] | |
name = "testing_compiler_error" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
sqlx = { version = "0.6", features = [ "runtime-tokio-native-tls" , "postgres" ] } |
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
{ | |
description = "Example Rust development environment for Zero to Nix"; | |
# Flake inputs | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs"; # also valid: "nixpkgs" | |
rust-overlay.url = "github:oxalica/rust-overlay"; # A helper for Rust + Nix | |
}; | |
# Flake outputs |
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
-- Install packer | |
local install_path = vim.fn.stdpath 'data' .. '/site/pack/packer/start/packer.nvim' | |
local is_bootstrap = false | |
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then | |
is_bootstrap = true | |
vim.fn.system { 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path } | |
vim.cmd [[packadd packer.nvim]] | |
end | |
require('packer').startup(function(use) |
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
fn comb<T>(slice: &[T], k: usize) -> Vec<Vec<T>> | |
where | |
T: Copy, | |
{ | |
// If k == 1, return a vector containing a vector for each element of the slice. | |
if k == 1 { | |
return slice.iter().map(|x| vec![*x]).collect::<Vec<Vec<T>>>(); | |
} | |
// If k is exactly the slice length, return the slice inside a vector. | |
if k == slice.len() { |
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
ubuntu@fedimintss:~/fedimint$ echo $IN_NIX_SHELL | |
impure | |
ubuntu@fedimintss:~/fedimint$ mv /home/ubuntu/.cargo/bin/cargo-clippy /usr/local/bin | |
mv: cannot move '/home/ubuntu/.cargo/bin/cargo-clippy' to '/usr/local/bin/cargo-clippy': Permission denied | |
ubuntu@fedimintss:~/fedimint$ sudo !! | |
sudo mv /home/ubuntu/.cargo/bin/cargo-clippy /usr/local/bin | |
ubuntu@fedimintss:~/fedimint$ echo $! >> $FM_PID_FILE^C | |
ubuntu@fedimintss:~/fedimint$ cargo clean | |
+ command cargo clean | |
ubuntu@fedimintss:~/fedimint$ cargo cleanc^C |
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
ubuntu@fedimintss:~/fedimint$ cargo clean | |
+ command cargo clean | |
ubuntu@fedimintss:~/fedimint$ ./scripts/final-checks.sh | |
Compiling libc v0.2.127 | |
Compiling autocfg v1.1.0 | |
Compiling proc-macro2 v1.0.43 | |
Compiling quote v1.0.21 | |
Compiling unicode-ident v1.0.3 | |
Compiling syn v1.0.99 | |
Checking cfg-if v1.0.0 |
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
ubuntu@fedimintss:~/fedimint$ ./scripts/final-checks.sh | |
Compiling libc v0.2.127 | |
Compiling autocfg v1.1.0 | |
Compiling proc-macro2 v1.0.43 | |
Compiling quote v1.0.21 | |
Compiling unicode-ident v1.0.3 | |
Compiling syn v1.0.99 | |
Checking cfg-if v1.0.0 | |
Compiling memchr v2.5.0 | |
Checking once_cell v1.13.0 |
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 | |
# DISCLAIMER: It is not a good idea to store large amounts of Bitcoin on a VPS, | |
# ideally you should use this as a watch-only wallet. This script is expiramental | |
# and has not been widely tested. The creators are not responsible for loss of | |
# funds. If you are not familiar with running a node or how Bitcoin works then we | |
# urge you to use this in testnet so that you can use it as a learning tool. | |
# This script installs the latest stable version of Tor, Bitcoin Core, | |
# Uncomplicated Firewall (UFW), debian updates, enables automatic updates for |
NewerOlder