Skip to content

Instantly share code, notes, and snippets.

View hakonhagland's full-sized avatar

Håkon Hægland hakonhagland

  • NORCE Research
  • Norway, Bergen
View GitHub Profile
@raiph
raiph / trans.md
Last active January 22, 2021 22:33
trans DWEM

What this is

My documentation of P6's .trans routine for anyone who reads it.

It may be a step toward updating the official doc and/or cleaning up the relevant spec tests and/or functionality.

I have tried to be clear enough that a future me will be able to make sense of it, and hopefully anyone else who reads this.

It's supposedly exhaustive (definitely exhausting!).

@aaangeletakis
aaangeletakis / How-To-Install-SDL-On-Ubuntu.md
Last active August 3, 2024 07:06
How do I install SDL on ubuntu?

What you need to do to install SDL is:

#install sdl2
sudo apt install libsdl2-dev libsdl2-2.0-0 -y;

#install sdl image  - if you want to display images
sudo apt install libjpeg-dev libwebp-dev libtiff5-dev libsdl2-image-dev libsdl2-image-2.0-0 -y;

#install sdl mixer  - if you want sound
@purp
purp / README.md
Last active August 22, 2024 18:59
Debug Travis CI config locally using Docker

Debugging Travis CI locally using Docker

This assumes you've got docker-machine installed, running, and can do docker run

1. Get a debug instance running

    docker run --name travis-debug -dit quay.io/travisci/travis-ruby /sbin/init
    docker exec -it travis-debug bash -l
@kozikow
kozikow / back.el
Created September 5, 2016 13:49
Back button for emacs
;; TODO Check out helm--push-mark
(defun record-global-position-for-back-button (&rest not-used-args)
"Push mark, and add it to `global-mark-ring'.
This function differs from `push-mark' in that `global-mark-ring'
is always updated."
(let (location (point-marker))
(callf or location (point))
(push-mark location)
;; (when (and (eq consecutives 'limit)
@nepsilon
nepsilon / how-to-git-patch-diff.md
Last active August 9, 2024 09:14
How to generate and apply patches with git? — First published in fullweb.io issue #33

How to generate and apply patches with git?

It sometimes happen you need change code on a machine from which you cannot push to the repo. You’re ready to copy/paste what diff outputs to your local working copy.

You think there must be a better way to proceed and you’re right. It’s a simple 2 steps process:

1. Generate the patch:

git diff > some-changes.patch
@nicoguaro
nicoguaro / shading_surf3d.py
Created July 22, 2015 20:27
3D surface with light shading using matplotlib.
"""
Example showing shaded 3d plots. It is based on the [shading example](
http://matplotlib.org/examples/pylab_examples/shading_example.html).
The surface used is the Matlab `peaks()`.
"""
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D