Skip to content

Instantly share code, notes, and snippets.

View rjleaf's full-sized avatar

Ryan Leaf rjleaf

View GitHub Profile
@rjleaf
rjleaf / iso3166_codes.d.ts
Created December 5, 2023 20:39
Typescript Enum for ISO-3166-1 (Alpha-2) Country Codes
// based on the list here: https://github.com/georgzoeller/iso-3166-1-alpha-2/blob/master/index.js
type ISO3166Codes =
'af'
| 'ax'
| 'al'
| 'dz'
| 'as'
| 'ad'
| 'ao'
| 'ai'
@rjleaf
rjleaf / tensorflow_fedora.md
Last active August 19, 2021 08:04
Tensorflow on Fedora

Note: Adapted from official Ubuntu instructions for Tensorflow using virtualenv.

This gist is currently a "Work in Progress". It works, but requires superuser privileges. I have not tested it with GPU support.

  1. Install pip and Virtualenv by issuing one of the following commands:
sudo dnf install python-pip python-devel python-virtualenv  # for Python 2.7
sudo dnf install python3-pip python3-devel python3-virtualenv # for Python 3.x
@rjleaf
rjleaf / azure-cli-on-fedora.md
Last active September 1, 2017 15:35
Azure-CLI on Fedora 25+

Installing Azure-CLI on Fedora 25+

If you've tried to simply execute Microsoft's Azure-CLI installation method using curl and bash, you've probably run into errors about gcc being unable to find certain files during the build process. No fear, it's just a few dependencies that we need here.

Dependencies

From a basic Fedora 25 (or later) Workstation install, you'll need gcc, libffi-devel, python-devel, openssl-devel and redhat-rpm-config. Run this command to install:

sudo dnf -y install gcc libffi-devel python-devel openssl-devel redhat-rpm-config
@rjleaf
rjleaf / vmware-f26-patch.sh
Created August 28, 2017 00:19
Fedora 26 - VMware Workstation 12.5.x patch (works with kernel 4.12.8 !!)
#/bin/sh
# Credit - Khaled Ben naaman (via http://rglinuxtech.com/?p=1992)
dnf install elfutils-libelf-devel
cp -r /usr/lib/vmware-installer/2.1.0/lib/lib/libexpat.so.0 /usr/lib/vmware/lib
cd /usr/lib/vmware/lib/libz.so.1
mv -i libz.so.1 libz.so.1.old
ln -s /usr/lib64/libz.so.1 .
@rjleaf
rjleaf / gist:d70e4ed835e515307fe2bff3789c1261
Last active April 25, 2016 16:14 — forked from smoser/gist:4756561
boot a cloud image in kvm on CentOS 7 (ubuntu 14.04 lts guest)
## Install a necessary packages
$ sudo yum install kvm cloud-utils genisoimage
## URL to most recent cloud image of 12.04
$ img_url="http://cloud-images.ubuntu.com/server/releases/14.04/release"
$ img_url="${img_url}/ubuntu-14.04-server-cloudimg-amd64-disk1.img"
## download the image
$ wget $img_url -O disk.img.dist
## Create a file with some user-data in it