Skip to content

Instantly share code, notes, and snippets.

@ozapinq
ozapinq / page_turn.dart
Created September 7, 2025 07:28 — forked from slightfoot/page_turn.dart
Page Turn Effect - By Simon Lightfoot. Replicating this behaviour. https://www.youtube.com/watch?v=JqvtZwIJMLo
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// 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
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@ozapinq
ozapinq / ast_to_xml.py
Created January 27, 2019 15:01
simple script for AST to XML transformation
import sys
import ast
from lxml.etree import Element, SubElement, tostring
def convert_to_xml(node):
def wrapped(parent, current_node):
node_type = current_node.__class__.__name__
if parent is None:
@ozapinq
ozapinq / battery-status
Created August 17, 2018 12:53
Simple script to print battery status in one line (FreeBSD)
#!/bin/sh
# --------------------------------------------------------------
# Display battery capacity and charging state in oneline format:
# $ battery-status 0
# 99% (2:17)
# --------------------------------------------------------------
acpiconf -i $1 | awk '
BEGIN { FS=":[[:blank:]]+"; OFS=":" }