Skip to content

Instantly share code, notes, and snippets.

View derekslenk's full-sized avatar

Derek Slenk derekslenk

View GitHub Profile
@kice
kice / bandwidthd.widget.php
Last active November 14, 2022 17:59
OPNsense dashboard widget for bandwidthd
<?php
/*
* Copyright (C) 2014 Deciso B.V.
* Copyright (C) 2009 Scott Ullrich <sullrich@gmail.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,

WSL 2 with CUDA

Set up Windows Subsystem for Linux (version 2) with CUDA support + TensorFlow.

Before you start

  • You must be on Windows 10 21H2 or above.

    Note: On my system 21H2 could not be updated to. I ended up with a bricked install as Windows tried to install Windows 11 on my unsupported CPU. I recommend just installing Windows 10 21H2 directly from an ISO.

  • You don't have to be on OS build 20140 or above as some sources state. My build: 19044.1469
  • Install the latest "game ready driver" for your card.
@elonmallin
elonmallin / ssh-copy-id.ps1
Last active March 22, 2024 12:02
One-liner ssh-keygen and ssh-copy-id for Windows powershell
ssh-keygen && cat $env:userprofile/.ssh/id_rsa.pub | ssh user@linuxserver 'cat >> .ssh/authorized_keys'
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
@ryaninvents
ryaninvents / unsubmodule.md
Created May 5, 2016 13:25
Convert git submodule to regular directory

From Stack Overflow.

# Fetch the submodule commits into the main repository
git remote add submodule_origin git://url/to/submodule/origin
git fetch submodule_origin

# Start a fake merge (won't change any files, won't commit anything)
git merge -s ours --no-commit submodule_origin/master
@ikegami-yukino
ikegami-yukino / install_byobu_yum.sh
Last active February 11, 2020 07:14
Install byobu to CentOS and Amazon Linux
sudo yum install byobu -y --enablerepo=epel-testing