Skip to content

Instantly share code, notes, and snippets.

View fepitre's full-sized avatar

Frédéric Pierret fepitre

  • France
View GitHub Profile
@fepitre
fepitre / NoVNC_Paste.js
Created April 22, 2023 09:01 — forked from byjg/NoVNC_Paste.js
How to Paste code to NoVNC.
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
window.sendString = function (str) {
f(str.split(""));
function f(t) {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/);
# Prep
echo "lorbus" > ~/.fedora.upn
ssh-keygen
# Add the created public key on https://admin.fedoraproject.org/accounts (and pagure.io)
# Create src.fp.o API key on web interface and save locally (Valid 60 Days)
cat <<EOF > ~/.config/rpkg/fedpkg.conf
[fedpkg.pagure]
token = <token_here>
EOF
#!/bin/bash
set -eu
if [ "${DEBUG:-0}" == "1" ]; then
set -x
fi
bind_dir="$(readlink -f "$1")"
bind_name="$(basename "${bind_dir}")"
#!/bin/bash
set -eu
if [ "${DEBUG:-0}" == "1" ]; then
set -x
fi
systemd_unit="$1"
@fepitre
fepitre / qvm-portfwd-iptables
Last active February 1, 2024 12:49 — forked from Joeviocoe/qvm-portfwd-iptables
Qubes-os port forwarding to allow external connections
#!/bin/bash
# Frédéric Pierret <frederic.pierret@qubes-os.org>
# Adapted from previous work:
# - https://gist.github.com/daktak/f887352d564b54f9e529404cc0eb60d5
# - https://gist.github.com/jpouellet/d8cd0eb8589a5b9bf0c53a28fc530369
# - https://gist.github.com/Joeviocoe/6c4dc0c283f6d6c5b1a3f5af8793292b
[ "$DEBUG" = 1 ] && set -x