Skip to content

Instantly share code, notes, and snippets.

View HarvsG's full-sized avatar

HarvsG

View GitHub Profile
@HarvsG
HarvsG / popUSB.md
Last active February 25, 2022 12:23
Reminder on how to set up on POP! OS on an USB stick with 10gb spare for use

How to put pop os on a USB

  1. On a second USB create a POP OS live disk using pop os and balenaEtcher
  2. Boot that up - may have to disable secure-boot
  3. Boot up in UEFI mode, not legacy or USB mode
  4. Go through the install guide
  5. Select advanced set up NOT 'clean install'
  6. Set up partitions thusly
  • Partition table = GPT
  • 1st partition EFI, 512mb, fat 32
@HarvsG
HarvsG / MPMP4generalSolution.py
Last active April 21, 2020 17:50
My solution to Matt Parker's 4 CARD PUZZLE (MPMP PUZZLE 4) https://www.youtube.com/watch?v=oCMVUROty0g
import itertools
import sys
if sys.version_info[0] < 3:
raise Exception("Python 3 or a more recent version is required.")
class Deck:
# a class that takes an array of True/False of any length. True equals face down
def __init__(self,cards):
@HarvsG
HarvsG / mpmp3.py
Last active April 21, 2020 18:53
My solution to Matt Parker's SCRABBLE PUZZLE (MPMP PUZZLE 3) https://www.youtube.com/watch?v=JaXo_i3ktwM&t
import sys
if sys.version_info[0] < 3:
raise Exception("Python 3 or a more recent version is required.")
# this will serve as a dictionary of what each tile face is worth
scores = {"A": 1 , "B": 3 , "C": 3 , "D": 2 ,
"E": 1 , "F": 4 , "G": 2 , "H": 4 ,
"I": 1 , "J": 8 , "K": 5 , "L": 1 ,
"M": 3 , "N": 1 , "O": 1 , "P": 3 ,
.markup.jupyter { /*!
*
* Twitter Bootstrap
*
*/
/*!
* Bootstrap v3.3.7 (http://getbootstrap.com)
* Copyright 2011-2016 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
@HarvsG
HarvsG / gitea-blog.md
Last active July 15, 2021 02:52
draft for gitea blog post
date author title tags draft
2020-07-22T20:00:00+00:00
HarvsG
How to render Jupyter Notebooks on Gitea
rendering
jupyter
ui
true

How to render Jupyter Notebooks on Gitea


@HarvsG
HarvsG / aOracleAlwaysOnWGVPN.md
Last active August 28, 2024 12:26
How I set up and always on wigaurd PiHole VPN and DNS
@HarvsG
HarvsG / installNewPython.md
Last active November 14, 2020 22:55
How to install a new version of python on the raspberry pi

Install the packages for compiling $ sudo apt-get install -y build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev wget

Set the python version you want $ version=3.8.5

Download $ wget https://www.python.org/ftp/python/$version/Python-$version.tgz ~/

Extract the file

.markup.jupyter {
pre { line-height: 125%; margin: 0; }
td.linenos pre { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
span.linenos { color: #000000; background-color: #f0f0f0; padding-left: 5px; padding-right: 5px; }
td.linenos pre.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; }
.highlight .c { color: #408080; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #FF0000 } /* Error */

How to create a new env for a jupyter workspce

  1. Ensure that the requirement for working with envs are installed sudo apt install python3-venv

  2. Work out the python version you want to work with python --version or python3 --version or which python

  3. Once you have chosen the python version cd to the directory you want the env to be stored in

  4. run /path/to/my/python3 -m venv nameOfEnv of course this may just be python not python3

  • in my case /usr/bin/python3
@HarvsG
HarvsG / HA-GLinet-Intergration.md
Last active June 24, 2021 13:54
My plan to build a GL inet integration for HomeAssistant