Skip to content

Instantly share code, notes, and snippets.

View Wombatpm's full-sized avatar

Wombatpm Wombatpm

  • Unremarkable planet around a yellow sun, Mostly Harmless
View GitHub Profile
@Wombatpm
Wombatpm / Ubuntu Python3
Created June 2, 2020 14:40
Build Python3 from source for Ubuntu Xenial
#At a shell prompt (in a terminal), run
sudo apt-get update \
&& sudo apt-get install -y build-essential git libexpat1-dev libssl-dev zlib1g-dev \
libncurses5-dev libbz2-dev liblzma-dev \
libsqlite3-dev libffi-dev tcl-dev linux-headers-generic libgdbm-dev \
libreadline-dev tk tk-dev wget
git clone https://github.com/python/cpython.git
cd cpython && ./configure --prefix=/usr \
--enable-loadable-sqlite-extensions \
@Wombatpm
Wombatpm / PythonBuild.sh
Created April 22, 2020 19:42
Build Python3.7.7 for Centos7
yum install epel-release
yum install gcc openssl-devel bzip2-devel libffi libffi-devel
yum install ncurses-devel th-devel readline-devel sqlite-devel
yum install gdbm-devel uuid-devel xz-devel python3-devel python3-setuptools
libc6-dev v zlib1g-dev
yum install wget
cd /root
wget https://www.python.org/ftp/python/3.7.7/Python-3.7.7.tgz
@Wombatpm
Wombatpm / centos.md
Last active March 8, 2023 07:31
Setup CentOS for WSL2 with Django and Postgres
@Wombatpm
Wombatpm / cbv_multiple_forms.html
Created July 24, 2019 15:31 — forked from badri/cbv_multiple_forms.html
Django multiple forms code with sample usage
{% extends "base.html" %}
{% block content %}
<form method="post">{% csrf_token %}
{{ forms.subscription }}
<input type="submit" value="Subscribe">
</form>
<form method="post">{% csrf_token %}
{{ forms.contact }}
<input type="submit" value="Send">
@Wombatpm
Wombatpm / admin.py
Created June 13, 2019 16:11 — forked from haxoza/admin.py
Django custom user model & custom admin
from django.contrib import admin
from django.contrib.auth import admin as auth_admin
from .models import *
from forms import UserChangeForm, UserCreationForm
class UserAdmin(auth_admin.UserAdmin):
fieldsets = (
(None, {'fields': ('email', 'password')}),
('Personal info', {'fields': ('first_name', 'last_name', 'twitter', 'photo', 'event')}),

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com

@Wombatpm
Wombatpm / Django Apache Deploy
Created September 19, 2018 15:02 — forked from atheiman/Django Apache Deploy
Simplified Django deploy using Apache HTTP Server.
Simplified Django deploy using Apache HTTP Server.
@Wombatpm
Wombatpm / BuildPython36.sh
Created December 11, 2017 20:23
Building and installing Python 3.6 for Ubuntu 16.04 LTS as part of Vagrant Provisioning
#!/usr/bin/env bash
# Script to Build Python 3.6.3 for Ubuntu 16.04
#
# Ubuntu 16.04 is and LTS release with Python for System use locked at 3.5
# This script builds Python3.6 from source and installs it in /usr/local
#
# Called from my VagrnantFile as
# config.vm.provision :shell, inline: "bash /var/www/myproj/VagrantScripts/BuildPython36.sh"
#
# Inspired by the wonderful instructions at