Skip to content

Instantly share code, notes, and snippets.

@ppmotskula
ppmotskula / 9cards.py
Created January 19, 2024 14:46
9cardpuzzle solver
#!/usr/bin/env python3
"""Solver for the 9 card puzzles made by Portel.ee
Usage:
1. Edit the CARDS constant to contain 9 card faces coded as follows:
Values (clockwise from the top): A/B/C/D for heads, a/b/c/d for tails
2. Run 9cards.py
"""
__author__ = "Peeter P. Mõtsküla"
__copyright__ = "Copyright (c) 2024 Peeter P. Mõtsküla"
@ppmotskula
ppmotskula / piactl
Last active August 25, 2024 09:10
piactl -- install, configure and control CNIL's PIA software
#!/bin/bash
ABOUT="piactl 0.10
Copyright (c) 2018-2020 Peeter P. Mõtsküla <[email protected]>
https://gist.github.com/ppmotskula/4288167460de27d22225e4959c44c6c4
License: MIT License (https://opensource.org/licenses/MIT)
piactl helps you to install, configure and control CNIL's PIA software
(https://www.cnil.fr/en/open-source-pia-software-helps-carry-out-data-protection-impact-assesment)
@ppmotskula
ppmotskula / getrln.sh
Last active March 20, 2018 09:21
getRLN -- get (R)EADME, (L)ICENSE, (N)OTICE files from a source tree
#!/bin/bash
# getrln.sh v 18.03.1
#
# Copyright (c) 2018 Peeter P. Mõtsküla <[email protected]>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@ppmotskula
ppmotskula / kindlustus-2018.md
Last active March 9, 2018 20:35
Kindlustus 2018

Kindlustus 2018

http://bit.ly/kindlustus-2018
Peeter P. Mõtsküla <[email protected]>, 2018-03-09

Alljärgnev on väike võrdlus mulle teadaolevatest kindlustuspakkumistest, mis võiksid huvi pakkuda reisivatele, langevarjutavatele ja/või sukelduvatele inimestele. Võrdlus tugineb vaadeldud pakkujate poolt üldsusele kättesaadavaks tehtud teabele.

Ülevaade

| | makse | medical | vastutus | surm | inva | skydive | scuba |

Keybase proof

I hereby claim:

  • I am ppmotskula on github.
  • I am ppmotskula (https://keybase.io/ppmotskula) on keybase.
  • I have a public key ASCldHH0q0_vuNYnonT9JHWmvBHLYzgvXevmr_D_PgeB_Ao

To claim this, I am signing this object:

@ppmotskula
ppmotskula / eRT+.user.js
Last active August 29, 2015 14:19
eRT+ hoiab õigusakti sisukorra Riigi Teatajas pidevalt nähtaval ja võimaldab akti välja trükkida koos sisukorraga.
// ==UserScript==
// @name eRT+
// @version 0.1.1
// @namespace http://facebook.com/seadused/
// @include https://www.riigiteataja.ee/akt/*
// @match https://www.riigiteataja.ee/akt/*
// @copyright (C) 2011-2015 Peeter P. Mõtsküla <[email protected]>
// @license GPLv3+ (http://www.gnu.org/licenses/gpl.html)
// @description eRT+ hoiab õigusakti sisukorra elektroonilises Riigi Teatajas pidevalt nähtaval ja võimaldab akti välja trükkida koos sisukorraga. Seda kõike eeldusel, et kasutad Mozilla Firefox'i koos GreaseMonkey laiendusega või Google Chrome'i.
// ==/UserScript==
@ppmotskula
ppmotskula / remote-unlock-ubuntu-fde.sh
Created April 2, 2013 19:54
Enable remote unlocking of a fully encrypted (dm-crypt/LUKS) Ubuntu 12.10 server via SSH.
#!/bin/bash
cat << ENDMSG
This script enables you to remotely unlock a fully encrypted (dm-crypt/LUKS) Ubuntu 12.10 server via SSH.
The script must be run as root (via sudo).
Contains bits gratefully taken from
http://hacksr.blogspot.com/2012/05/ssh-unlock-with-fully-encrypted-ubuntu.html and
http://blog.nguyenvq.com/2011/09/13/remote-unlocking-luks-encrypted-lvm-using-dropbear-ssh-in-ubuntu/
@ppmotskula
ppmotskula / view64.sh
Created January 25, 2012 04:06
chroot setup script to allow running 32-bit vmware-view-client in 64-bit Oneiric
#!/bin/bash
echo "
Tech Preview of the VMware View Client with PCoIP for Linux --
chroot installer for 64-bit Ubuntu Oneiric
Copyright (c) 2012 Peeter P. Mõtsküla <[email protected]>
"
# set global variables
@ppmotskula
ppmotskula / x
Created March 21, 2009 20:24
freedict
//Note: This command was automatically generated by the create-new-search-command command.
CmdUtils.makeSearchCommand({
name: "freedict-enet",
url: "http://freedict.info/dictionary.html?query={QUERY}&lang=en&meth=part&switch=et&focus=true",
icon: "http://freedict.info/favicon.ico",
description: "en-et translation at freedict.info",
author: { name: "Peeter P. Mõtsküla", email: "[email protected]" }
});
//Note: This command was automatically generated by the create-new-search-command command.