Skip to content

Instantly share code, notes, and snippets.

View JucaRei's full-sized avatar
:electron:
Focusing

JucaRei

:electron:
Focusing
View GitHub Profile
@JucaRei
JucaRei / sudo with no password - alpine.md
Created August 2, 2023 03:19 — forked from arvati/sudo with no password - alpine.md
Alpine with sudo and no password

Alpine with sudo and no password

su root
addgroup -S sudo
addgroup manager sudo
getent group sudo
apk update
apk upgrade
apk --no-cache add openssh nano sudo tzdata
visudo /etc/sudoers.d/nopasswd
@JucaRei
JucaRei / docker-wsl2.md
Created August 1, 2023 23:08 — forked from martinsam16/docker-wsl2.md
How to install wsl2 ubuntu + docker + docker-compose

Activate wsl2

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
wsl --set-default-version 2

Install and Configure Ubuntu

@JucaRei
JucaRei / SSL-nginx-Docker.md
Created August 1, 2023 23:01 — forked from dahlsailrunner/SSL-nginx-Docker.md
SSL with Docker images using nginx as reverse proxy

Docker with SSL and an nginx reverse proxy

Running your ASP.NET Core (or other) application in Docker using SSL should not be an overwhelming task. These steps should do the trick.

Run the following steps from a Linux terminal (I used WSL or WSL2 on Windows from the Windows Terminal).

1. Create a conf file with information about the cert you'll be creating

It should look something like the content below; call it my-site.conf or something like that.

@JucaRei
JucaRei / 01_nixos_vim_container.md
Created May 27, 2023 04:30 — forked from heathdrobertson/01_nixos_vim_container.md
Setup Neovim using a NixOS Docker container.

Neovim IDE

Neovim IDE in a NixOS Docker Container

docker run --volumes-from=nix -it \
    -v $(pwd):/home \
    -w /home \
    --name <change-me> \
    -p 9005:9005 \
 -p 3000:3000 \
@JucaRei
JucaRei / starship.nix
Created May 27, 2023 04:28 — forked from s-a-c/starship.nix
Nix file to generate complete, mostly default, starship.toml, including equivalent of <format = "$all">
programs.starship = {
enable = true;
settings = {
# "$schema" = "https://starship.rs/config-schema.json";
add_newline = true;
command_timeout = 500;
continuation_prompt = "[∙](bright-black) ";
format = "[](0x9A348E)$username$hostname$localip$shlvl$singularity$kubernetes[](fg:0x9A348E bg:0xDA627D)$directory$vcsh[](fg:0xDA627D bg:0xFCA17D)$git_branch$git_commit$git_state$git_metrics$git_status$hg_branch[](fg:0x86BBD8 bg:0x06969A)$docker_context$package$buf[](fg:0xFCA17D bg:0x86BBD8)$c$cmake$cobol$container$daml$dart$deno$dotnet$elixir$elm$erlang$golang$haskell$helm$java$julia$kotlin$lua$nim$nodejs$ocaml$perl$php$pulumi$purescript$python$rlang$red$ruby$rust$scala$swift$terraform$vlang$vagrant$zig$nix_shell$conda$spack$memory_usage$aws$gcloud$openstack$azure$env_var$crystal$custom$sudo$cmd_duration$line_break$jobs$battery[](fg:0x06969A bg:0x33658A)$time$status$shell$character";
right_format = "";
scan_timeout = 30;
@JucaRei
JucaRei / ssh-add.md
Created May 27, 2023 02:14 — forked from egoens/ssh-add.md
Use this if ssh key keeps asking for password
@JucaRei
JucaRei / root-podman-wayland.sh
Created May 23, 2023 23:11 — forked from eoli3n/root-podman-wayland.sh
Run an application with dbus and wayland sockets in a rootless podman container
# Install docker or podman package on your distro (podman doesn't need a daemon like dockerd to work). All args are exactly same, just replace ``podman`` with ``docker`` in command if you want to.
sudo pacman -S podman
# Run an archlinux container with dbus and wayland sockets.
sudo podman run \
--volume "$XDG_RUNTIME_DIR/$WAYLAND_DISPLAY":/tmp/wayland-0 \
--device /dev/dri \
--volume /run/user/1000/bus:/tmp/bus \
--rm -it archlinux /bin/bash
# tailscale under podman on fedora
# tested on Fedora IOT (arm64 and amd64) and Silverblue (amd64).
# ensure the tun module is loaded by default
modprobe tun
echo tun > /etc/modules-load.d/tun.conf
# ensure iptables xt_mark module is enabled and loaded
modprobe xt_mark
echo xt_mark > /etc/modules-load.d/xt_mark.conf
# ensure iptables ip6table_filter module is enabled and loaded
modprobe ip6tables_filter
@JucaRei
JucaRei / 00_README.md
Created May 23, 2023 23:06 — forked from FilBot3/00_README.md
Trying to use VSCode from a Flatpak using Podman-Remote to connect to Host to use DevContainers