Skip to content

Instantly share code, notes, and snippets.

@abg1979
abg1979 / gist:e02882adb14f4d5cfb30a08d0070adb7
Created February 24, 2025 11:48
git import repository
0. Install git-filter-repo from https://github.com/newren/git-filter-repo
Do not perform these steps in an existing clone
1. Create a new empty repository
git init /path/to/your/new/main/repository
2. Clone the repository you want to import:
git clone https://github.com/username/repository.git
cd repository
@abg1979
abg1979 / skopeo.windows.md
Last active August 18, 2022 05:34
Build Skopeo for Windows
@abg1979
abg1979 / launch-GRD.sh
Created February 2, 2022 17:17 — forked from greyltc/launch-GRD.sh
configures then activates gnome-remote-desktop from the command line
#!/usr/bin/env bash
# this will overwrite all the settings it touches
# the name of the user to run these commands as
TARGET_USER=jane
# to start the desktop session remotely
echo -e "[daemon]\nAutomaticLogin=${TARGET_USER}\nAutomaticLoginEnable=true\n" | sudo tee /run/gdm/custom.conf
sudo systemctl restart gdm
@abg1979
abg1979 / wsl-fedora.md
Last active April 7, 2025 15:54
WSL Fedora Creation

Copy of https://dev.to/bowmanjd/install-fedora-on-windows-subsystem-for-linux-wsl-4b26

Obtain a rootfs image of Fedora

We first need a rootfs (the base filesystem for the Linux distro in question, in this case Fedora). There a few ways to get this.

Obtain rootfs from Fedora Container Base

The rootfs embedded in the Fedora-Container-Base-Generic project seems to work well, and is my preferred method, as it offers a lot of flexibility. I start with the most recent stable version of Fedora that auto-built successfully. If you want to be bleeding edge, you can download the latest Rawhide image that built successfully, but I am using the latest Fedora 35 for now. The "State" column indicates build success. Pick the latest with a green checkmark.

@abg1979
abg1979 / choco-au-gist.txt
Last active October 18, 2021 13:22
choco-au-gist
1.txt
@abg1979
abg1979 / ca.md
Last active July 12, 2018 06:31
openssl certificate authority

openssl.conf

[ CA_default ]
  
dir             = ./CA     # Where everything is kept
certs           = $dir/certs        # Where the issued certs are kept
crl_dir         = $dir/crl      # Where the issued crl are kept
database        = $dir/CA/index.txt # database index file.
#unique_subject = no            # Set to 'no' to allow creation of
                    # several ctificates with same subject.

new_certs_dir = $dir/newcerts # default place for new certs.

@abg1979
abg1979 / pr.md
Created June 22, 2018 08:25 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: