Skip to content

Instantly share code, notes, and snippets.

View demaniak's full-sized avatar

Hendrik Coetzee demaniak

  • @Advance.io
  • PTA, South Africa
View GitHub Profile
@demaniak
demaniak / recover-from-sleep.sh
Last active September 20, 2023 11:09
Work-a-round for black screen after sleep on Lenovo Lengion running linux with hybrid graphics
#!/bin/bash
# After the lenovo legion laptop with Nvidia discrete graphics is woken up from sleep mode,
# and the screen where X is running is black, go to a text terminal (CTRL+ALT+F1).
# Log in, then run this script.
# While it is running, go back to the screen X is running on, typically CTRL+ALT+F7.
# After a moment or two, your X-session should come back.
#
# PS: I found ths somewhere on the web, I don't remember where. It has helped me at least.
#
@demaniak
demaniak / viz.py
Created May 19, 2020 21:02 — forked from kobus-v-schoor/viz.py
Entelect Challenge 2020 Visualizer
#! /usr/bin/env python3
import json
import os
import sys
import math
import time
import sys
PLAYER = ['1', '2']
@demaniak
demaniak / Dockerfile
Created April 24, 2020 06:55
Run Microsoft teams in docker on linux
FROM ubuntu
RUN apt-get update && \
apt-get install -y curl apt-utils \
libasound2 libatk-bridge2.0-0 libcairo2 libcups2 libgdk-pixbuf2.0-0 \
libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 \
libsecret-1-0 libx11-xcb1 libxcomposite1 libxcomposite1 \
libxss1 apt-transport-https libxkbfile1
COPY teams.deb /tmp/teams.deb
#!/bin/bash
#
# Simple wrapper script for the python visualizer created by [Kobus van Schoor](https://gist.github.com/kobus-v-schoor)
# Runs the visualizer in a docker container
#
if [ ! -f viz.py ]; then
curl -L https://gist.github.com/kobus-v-schoor/ec1923bb09858a5037df21444aeabbcd/raw/7c282e7fac668e1771d0ccd29dc583cb7738430c/viz.py > viz.py
chmod +x viz.py
fi
@demaniak
demaniak / keybase.md
Created November 11, 2018 20:09
keybase.io assertion

Keybase proof

I hereby claim:

  • I am demaniak on github.
  • I am demaniak (https://keybase.io/demaniak) on keybase.
  • I have a public key whose fingerprint is DE9C C375 035F 5A9A DF47 0860 6265 CE7E 2880 579E

To claim this, I am signing this object: