Skip to content

Instantly share code, notes, and snippets.

View usrbinkat's full-sized avatar
👩‍💻

Kat Morgan usrbinkat

👩‍💻
View GitHub Profile
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active July 2, 2024 14:42
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@andreicristianpetcu
andreicristianpetcu / ansible-summary.md
Created May 30, 2016 19:25
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of

@benjamincharity
benjamincharity / clearCache.sh
Created March 3, 2017 16:44
Clear the cache for a CircleCI project.
curl -X DELETE https://circleci.com/api/v1/project/:username/:project/build-cache?circle-token=:token
@berkayunal
berkayunal / ._ Loading variables from .env files in Ansible.md
Created January 16, 2018 20:42
Loading variables from .env files in Ansible

Loading variables from .env files in Ansible

Ansible has various ways of looking up data from outside sources, including plain text password files, CSV files and INI files. But it doesn't seem to have a lookup for .env files, as used in Laravel projects, also available for PHP, Ruby, Node.js, Python and others.

One option is to launch Ansible with the Ruby dotenv command line script... But that requires Ruby, which seems like overkill to me.

So here is a simpler solution that I use. It consists of:

  1. The .env file itself
  2. A small shell script that loads the .env file into environment variables - ansible-playbook.sh
@tarnacious
tarnacious / build-qcow2.nix
Last active May 1, 2024 02:21
Build a bare bones bootable nixos qcow2 image suitable for running with libvirt/qemu/kvm.
{ config, lib, pkgs, ... }:
with lib;
{
imports =
[
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
./machine-config.nix
];
@sjenning
sjenning / extract-ignition-filesystem.py
Created January 21, 2020 20:32
Extracts a filesystem from an ignition file
#!/usr/bin/env python3
import json
import os
import sys
import base64
ign_file = open(sys.argv[1])
ign_json = json.load(ign_file)
ign_file.close()
@pweil-
pweil- / gist:e7b156476c6171f04140370708f0cd56
Last active August 17, 2020 23:01
Air Gap Mirroring
###
# Create mirror repo following disconnected instructions
###
# create dir
mkdir -p ~/registry1/{auth,certs,data}
# create cert
openssl req -newkey rsa:4096 -nodes -sha256 -keyout ~/registry1/certs/domain.key -x509 -days 365 -out ~/registry1/certs/domain.crt
@jschwalbe
jschwalbe / WireGuard-site-to-site.md
Last active June 14, 2021 17:15
Accessing a subnet that is behind a WireGuard client using a site-to-site setup

WireGuard Site-to-Site

Accessing a subnet that is behind a WireGuard client using a site-to-site setup

Problem Summary

We want to access a local subnet remotely, but it is behind a NAT firewall and we can't setup port forwarding. Outgoing connections work, but all incoming connections get DROPPED by the ISP's routing policy.

Solution Summary

@cmwylie19
cmwylie19 / Kong-Gateway.md
Last active January 3, 2024 18:25
Kong Gateway on OpenShift

Kong Builders LiveStream

Focus: Kong Gateway

Background: Deploy and Secure Istio's Bookinfo application through Kong Gateway.

Topics:

@rain-1
rain-1 / llama-home.md
Last active June 19, 2024 03:05
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.