Skip to content

Instantly share code, notes, and snippets.

View txoof's full-sized avatar

Aaron Ciuffo txoof

View GitHub Profile
@txoof
txoof / multiple_profiles.md
Last active November 19, 2024 09:11
Multiple GitHub Profiles

Introduction

Enable working with multiple github profiles on the command line using multiple SSH keys.

Create SSH Keys

From the command line, generate an SSH key for each account to be accessed. Do this with care as you may already have an ssh key in use.

Generate ssh key pairs for accounts and add them to GitHub accounts. Do this with care; there may already be existing SSH keys in the local ~/.ssh/ directory. You will need one SSH key per GitHub identity. It is only necessary to generate keys for identities that do not yet exist.

@txoof
txoof / conda_setup.md
Last active July 22, 2024 11:08
Bootstrap miniconda Jupyter development environment on Windows

Bootstrap a Miniconda/Anaconda Environment

Bootstrap a *conda development environment for jupyter lab development using multiple environments and kernels under windows 11.

This will allow the use of multiple kernels from a single Jupyter Lab session. Each notebook or project can run within a specific python virtual environment by using the kernel drop-down menu within the notebook. This helps avoid dependency conflicts between various libraries and allows multiple different python, ane even R versions symultaniously.

This is particularly useful if you:

  • Need to run an older verison of Python for legacy projects
  • Need to use conflicting versions of librarys such as PIL and pillow
@txoof
txoof / pdf_rmN.md
Last active November 13, 2024 15:01
PDF to Editable Remarkable Notebook (Mac OS)

Converting a PDF to an editable reMarkable Notebook

Use case: Working with PDF text books, it can be helpful to be able to extract problems and images to use in notes and when working problemsets on the reMarkable tablet.

These instructions are MacOS centric, but should be reproducable on most platforms as the tools are fairly platform agnostic.

Requirements

  • homebrew - package manager for installing components
  • DrawJ2d - Convert PDF to remarkable notebook (rmn) format
@txoof
txoof / spocon.md
Last active January 14, 2025 17:48
Install SpoCon on BookWorm and Later if Installer Fails

Installer Failure Modes

Failure: Unmet Dependendencies

Open JDK 8, 11 are unavailable for Bookworm and later

The following packages have unmet dependencies:
 spocon : Depends: openjdk-11-jre but it is not installable or
                   openjdk-8-jre but it is not installable
@txoof
txoof / PowerQuery_Notes.md
Last active December 19, 2024 01:17
Guide for things that can and should not be done when creating power queries.

PowerQuery Creation Notes

Notes

Returned Column References

The columns section of the XML document refer to the columsn that will be offered in the Data Export Manager screens. The text of the column name is arbitrary and can be anything, but the <column column="TABLE.FIELD"> portion must refer to a "core" table of powerschool. When in doubt, use column="STUDENTS.ID" Avoid using DCID of any table in the column parameter as it might render the query disabled in DEM (grayed out). Reason being the DCID of most tables, starting with Students, is a non-editable identifier key even for system admin roles. Having DCID in SQL and in feild access is acceptable.

@txoof
txoof / PyPi.md
Last active October 30, 2023 19:28
Trusted Publishing to PyPI

Trusted Publishing to PyPI

PyPi no longer allows simple username/password authhentication through twine. 2FA is now required for all publisyhing.

This gist is based on this PyPA guide

Requirements

@txoof
txoof / syncthing setup.md
Last active August 11, 2023 18:42
Set up Syncthing on Linux host for multiple users

Set Up SyncThing on Linux Host for Multiple Users

This covers setting up SyncThing on Ubunty/Debian

Install Syncthing

$ sudo apt-install syncthing

Enable Syncthing for Each User

#!/usr/bin/env python3
# coding: utf-8
# display the time vaugely as a string (The Time is about Ten to Seven); update every 5 minutes
# to adjust the timing use:
# $ word_clock.py -t xx
import os
from datetime import datetime
@txoof
txoof / tunneling.md
Last active June 25, 2024 00:54
Tunnel ssh connections through firewalls

SSH Tunnels

Situation: Local Network Firewall blocks outgoing connections to remote hosts on port 22

In this situation it is not possible to connect to remote hosts (e.g. github.com) for managing repos over ssh. A tunnel through a remote host (tunnel.myhost.com) can remedy this. An ssh configuration file can be added to the ~/.ssh/config directory to specify a specific command for connecting github.com. See also How to setup SSH Tunneling

Setup

  1. create a tunnel host that accepts incomming connections:
    • tunnel.myhost.com
  2. install nc
@txoof
txoof / pyenv_mac_os.md
Last active October 6, 2022 09:04
Setup Python pyenv for Jupyter with nbconvert on Mac OS

If nbconvert throws a similar error, it is likely because the jupyter installation is not setup properly within a pyenv

ValueError: No template sub-directory with name 'python' found in the following paths:
	/Users/aciuffo/Library/Jupyter
	/opt/homebrew/Cellar/[email protected]/3.9.2_1/Frameworks/Python.framework/Versions/3.9/share/jupyter
	/usr/local/share/jupyter
	/usr/share/jupyter