Skip to content

Instantly share code, notes, and snippets.

View datakurre's full-sized avatar

Asko Soukka datakurre

View GitHub Profile
@datakurre
datakurre / .gitignore
Last active December 9, 2023 01:41
Multi-kernel Jupyter notebook environment and Docker container with Nix
*.ipynb
*.png
*.tar.gz
.ipynb_checkpoints
.ipython
.jupyter
.sentinel.*
@datakurre
datakurre / minecraft-bedrock-server.nix
Last active November 19, 2023 23:11
Minecraft Bedrock Server NixOS module
{ config, lib, pkgs, ... }:
let
libCrypto = with pkgs; stdenv.mkDerivation rec {
name = "${pname}-${version}";
pname = "minecraft-bedrock-server-libcrypto";
version = "1.16-201.02";
src = fetchurl {
url = "https://minecraft.azureedge.net/bin-linux/bedrock-server-1.16.201.02.zip";
@datakurre
datakurre / connection.py
Last active September 22, 2023 11:13
Python 3.5 async / await example with HTTP-AMQP -bridge and Nix based development environment
# -*- coding: utf-8 -*-
import aioamqp
connection = None
protocol = None
async def disconnected(exception):
global connection, protocol
@datakurre
datakurre / example.robot
Last active February 27, 2023 06:50
Setting custom user agent for Firefox with RobotFramework and Selenium2Library
*** Settings ***
Library Selenium2Library
*** Test Cases ***
Open desktop version
Open browser https://www.arstechnica.com/
Open mobile version
@datakurre
datakurre / .gitignore
Last active December 29, 2022 10:29
Minimal Nix Docker
*.tar.gz
.sentinel.*
@datakurre
datakurre / python-packages.nix
Last active October 14, 2022 04:52
"setup.nix" packaging example
# Generated by pip2nix 0.8.0.dev1
# See https://github.com/nix-community/pip2nix
{ pkgs, fetchurl, fetchgit, fetchhg }:
self: super: {
"Babel" = super.buildPythonPackage rec {
pname = "Babel";
version = "2.9.0";
src = fetchurl {
@datakurre
datakurre / Cargo.lock
Last active September 24, 2022 17:56
River environment for Nix
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "autocfg"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
@datakurre
datakurre / VisionLibrary.py
Last active September 19, 2022 12:24
Clicking Selenium elements with OpenCV library
from robot.libraries.BuiltIn import BuiltIn
import cv2
import shutil
import tempfile
class TemporaryDirectory(object):
def __enter__(self):
self.name = tempfile.mkdtemp()
@datakurre
datakurre / README.md
Last active September 15, 2022 18:52
madbg Python environment with Nix
@datakurre
datakurre / test_testability_disabled.robot
Last active June 17, 2022 09:43
Example robotframework-seleniumtestability test suites for Plone
*** Settings ***
Resource plone/app/robotframework/saucelabs.robot
Resource plone/app/robotframework/selenium.robot
Library Selenium2Library
Test Setup Run keywords Plone test setup
Test Teardown Run keywords Plone test teardown