Skip to content

Instantly share code, notes, and snippets.

View matthiasdebernardini's full-sized avatar
💭
building trident vault

Matthias Debernardini matthiasdebernardini

💭
building trident vault
  • USA
View GitHub Profile
@matthiasdebernardini
matthiasdebernardini / init.lua
Created January 13, 2023 19:43
starter nvim config with rust
-- 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)
@matthiasdebernardini
matthiasdebernardini / flake.nix
Created March 23, 2023 23:57
python and rust dev shell
{
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
@matthiasdebernardini
matthiasdebernardini / Cargo.toml
Created March 27, 2023 21:20
files for devenv framework not found error
[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" ] }
@matthiasdebernardini
matthiasdebernardini / rocketguide.md
Created September 29, 2023 19:55 — forked from belst/rocketguide.md
Deploy Rocket in production

Deploy Rocket using Letsencrypt and nginx

Information

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.

Prerequisites

You need to have nginx, certbot and rust installed.