Skip to content

Instantly share code, notes, and snippets.

View patrickmmartin's full-sized avatar

Patrick Martin patrickmmartin

View GitHub Profile
@patrickmmartin
patrickmmartin / PYTHON_DEFAULT.md
Created February 5, 2017 09:48
update-alternatives for python3 on Ubuntu

Ubuntu 16 default python is almost python 3

Loads of solutions exist, but for changing the system default, alias is not the way to go.

$ update-alternatives --list python update-alternatives: error: no alternatives for python

@patrickmmartin
patrickmmartin / colourwheels.html
Created October 22, 2018 20:36
Javascript colour generation
<!DOCTYPE html>
<html>
<body>
<div id="colour">???<div>
<button type="button" onclick="start()">Start</button>
<script>
var i = 0;
@patrickmmartin
patrickmmartin / PYOPENCL.md
Last active October 8, 2018 10:31
pyopencl setup

pyopencl installations

Linux (Ubuntu)

basic setup

Python Reading Material
=====================
https://julien.danjou.info/blog/2013/guide-python-static-class-abstract-methods
https://docs.python.org/2/library/functions.html
@patrickmmartin
patrickmmartin / CHECKING.md
Created May 25, 2017 13:55
examples of attempting to add static analysis to comdb2
splint -D_LINUX_SOURCE -Ibb -Ibbinc -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp db/*.c


splint +posixlib -D_LINUX_SOURCE -Isqlite/inline -I. -Iberkdb/build -Iberkdb/dbinc -Ibb -Ibbinc -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp/decNumber  -Idfp/dfpal -Idb -I/usr/include/x86_64-linux-gnu db/*.c


ls -1 db/*.c | splint -showscan  +posixlib -D_LINUX_SOURCE -Isqlite/inline -I. -Iberkdb/build -Iberkdb/dbinc -Ibb -Ibbinc -Ibdb -Iberkdb -Icdb2api -Icomdb2rle -Icrc32c -Icsc2 -Icson -Idatetime -Idb -Idfp -Idlmalloc -Ilua -Inet -Iprotobuf -Ischemachange -Isockpool -Isqlite -Itests -Itools -Idfp/decNumber  -Idfp/dfpal -Idb -I/usr/include/x86_64-linux-gnu 
@patrickmmartin
patrickmmartin / OPENCL_NOTES.md
Last active May 23, 2017 00:32
Notes on openCL

Integrating opencl into other toolchains

Overview

See TODO refs

@patrickmmartin
patrickmmartin / REMOTE_DESKTOP.md
Created May 15, 2017 23:39
vncserver setup on Ubuntu 16

when Vino-server just does not work (yet again)

Previously, so get access to the file-server desktop, used something like the instructions in the referenced pages to cobble together the start script below (which does not work 100% BTW).

@patrickmmartin
patrickmmartin / DEV_SETUP.md
Last active May 15, 2017 20:57
desktop contenary setup from clean
$ mkdir -p src/contenary
$ cd  src/contenary

$ git clone https://patrickmmartin@bitbucket.org/contenary/locus.git
The program 'git' is currently not installed. You can install it by typing:
sudo apt install git