Skip to content

Instantly share code, notes, and snippets.

View olymk2's full-sized avatar
๐Ÿ˜€
Using GitLab

Oliver Marks olymk2

๐Ÿ˜€
Using GitLab
View GitHub Profile
@olymk2
olymk2 / buildozer.spec
Created July 22, 2015 20:05
freetype test
[app]
# (str) Title of your application
title = FreetypeTest
# (str) Package name
package.name = freetypetest
# (str) Package domain (needed for android/ios packaging)
package.domain = org.freetypetest
import os
import Queue
import argparse
import webbrowser
import socket, fcntl, struct
import time, threading
from subprocess import Popen, PIPE
from docker import Client
docker_client = Client(base_url='unix://var/run/docker.sock')
#!/usr/bin/env/python3
# This file is /home/me/test-dbus.py
# Remember to make it executable if you want dbus to launch it
# It works with both Python2 and Python3
from gi.repository import Gtk
import dbus
import dbus.service
from dbus.mainloop.glib import DBusGMainLoop
@olymk2
olymk2 / pygame_generator.py
Created June 23, 2016 20:30
example pygame generator
def fetch_tiles(startColumn, endColumn, rows=20):
tilesToDraw = tiles[0:rows, startColumn:endColumn]
for rowCount, row in enumerate(tilesToDraw):
for columnCount, column in enumerate(row):
yield rowCount, columnCount
# Draw the tile array to the screen
def drawScreenTiles(tiles, pixelsScrolled, levelPosition):
startColumn = levelPosition / tileSize
@olymk2
olymk2 / recharge_cycle.ino
Created August 28, 2016 11:35
Current code for laser tag recharge cycle
/*
Blink
Turns on an LED on for one second, then off for one second, repeatedly.
This example code is in the public domain.
*/
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int ir_led = 4;

Keybase proof

I hereby claim:

  • I am olymk2 on github.
  • I am oly (https://keybase.io/oly) on keybase.
  • I have a public key whose fingerprint is 4266 B087 7825 D55E 5D64 36F6 E4AF A068 43DE 8993

To claim this, I am signing this object:

@olymk2
olymk2 / GLArea.py
Created February 11, 2017 22:03
Example trying to mix GLArea and pyopengl theat currently does not work.
#!/usr/bin/python
import os
import sys
from OpenGL.GLU import *
from OpenGL import GLX
from OpenGL import GL as GL
from ctypes import *
import gi
gi.require_version('Gtk', '3.0')
#!/usr/bin/python
import os
import sys
import OpenGL
# OpenGL.USE_ACCELERATE = False
# OpenGL.ERROR_CHECKING = False
from OpenGL.GLUT import *
from OpenGL.GLU import *
from OpenGL import GL as GL
@olymk2
olymk2 / argos_docker.sh
Last active May 17, 2017 14:48
Docker Argos
#!/usr/bin/env bash
echo "Docker"
echo "---"
# http://stackoverflow.com/a/14853319
TOP_OUTPUT=$(docker ps -q | xargs docker inspect --format="http://{{if ne \"\" .NetworkSettings.IPAddress}}{{ printf \"%.22s\" .NetworkSettings.IPAddress}}{{else}}{{range .NetworkSettings.Networks}}{{printf \"%.22s\" .IPAddress}}{{end}}{{end}} {{printf \"%.30s\" .Name}} | href=\"http://{{if ne \"\" .NetworkSettings.IPAddress}}{{ printf \"%.22s\" .NetworkSettings.IPAddress}}{{else}}{{range .NetworkSettings.Networks}}{{printf \"%.22s\" .IPAddress}}{{end}}{{end}}\"" | column -t -s@ -c 80)
echo "$TOP_OUTPUT | font=monospace bash=top useMarkup=true"