Instantly share code, notes, and snippets.

# Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
View test.json
import subprocess
from pathlib import Path
from datetime import datetime
from PIL import ImageGrab
import atexit
from urllib.parse import quote
class Server:
def __init__(self, root, port=14074):
View Program.cs
using System;
using System.Threading.Tasks;
namespace ConsoleApp2189
public static class Program
public static void Main(string[] args)
while (true)
View console de uboot
Xilinx Zynq MP First Stage Boot Loader
Release 2017.1 May 15 2017 - 09:28:05
NOTICE: ATF running on XCZU9EG/silicon v4/RTL5.1 at 0xfffea000, with PMU firmware
NOTICE: BL31: Secure code at 0x0
NOTICE: BL31: Non secure code at 0x8000000
NOTICE: BL31: v1.3(release):7d1a673
NOTICE: BL31: Built : 20:24:04, May 12 2017
U-Boot 2017.01 (May 12 2017 - 13:34:12 -0700) Xilinx ZynqMP ZCU102
View openpanzer-save.json
{"scenario":{"name":"Lodz - Warta River","maxTurns":25,"date":"1939-09-07T22:00:00.000Z","atmosferic":1,"latitude":3,"ground":0,"turnsPerDay":0,"dayTurn":0,"reinforcements":{"3":[{"row":37,"col":42,"unit":{"eqid":270,"id":-1,"owner":1,"hasMoved":false,"hasFired":false,"hasResupplied":false,"isMounted":false,"isSurprised":false,"isDeployed":false,"isCore":false,"tempSpotted":false,"strength":8,"facing":10,"flag":16,"destroyed":false,"player":null,"transport":null,"carrier":0,"moveLeft":3,"ammo":6,"fuel":0,"hasAnimation":false,"hits":0,"experience":55,"entrenchment":0,"entrenchTicks":0,"leader":-1},"turn":3,"id":1},{"row":37,"col":37,"unit":{"eqid":268,"id":-1,"owner":1,"hasMoved":false,"hasFired":false,"hasResupplied":false,"isMounted":false,"isSurprised":false,"isDeployed":false,"isCore":false,"tempSpotted":false,"strength":9,"facing":5,"flag":16,"destroyed":false,"player":null,"transport":{"eqid":278,"ammo":0,"fuel":55,"icon":"resources/units/images/pa846.png"},"carrier":0,"moveLeft":2,"ammo":7,"fuel":0,"has

Mutable types, immutable types, object references

The following statements are quatations from Jeff Knupp's blog-post "Is Python call-by-value or call-by-reference? Neither."

In Python a variable is not an alias for a location in memory. Rather, it is simply a binding to a Python object.

  • Changes to a mutable object are visible through all names bound to it. Python's lists are an example of mutable objects.
  • The value of immutable objects can not be modified after they are created. They can be used to compute the values of new objects, which is how a function like string.join works.

The following types are immutable:

View wpmudev-ppv-shortcode.php
* Plugin Name: [Pay Per View] - Elementor Patch
* Plugin URI:
* Description: Adds shortcode in Pay Per View for Elementor builder
* Author: Panos Lyrakis @ WPMUDEV
* Author URI:
* License: GPLv2 or later
if ( ! defined( 'ABSPATH' ) ) {