git format-patch -1 <sha>
OR
git format-patch -1 HEAD
git apply --stat file.patch
# show stats.
git apply --check file.patch
# check for error before applying
# -*- coding: utf-8 -*- | |
# Requires https://github.com/base4sistemas/pyescpos | |
# Have a look at https://github.com/base4sistemas/pyescpos/wiki | |
from __future__ import unicode_literals | |
from __future__ import print_function | |
import logging.config | |
from escpos import showcase | |
from escpos.conn.usb import USBConnection |
import random | |
import string | |
from lazyquicksort import lazy_sort | |
def chars(length): | |
options = string.ascii_lowercase | |
return ''.join([random.choice(options) for i in range(length)]) | |
Tested only on Ubuntu 20.04, KDE Neon User Edition (based on Ubuntu 20.04) and OSX Mojave.
will probably work on other newer versions, with no changes, or with few changes in non-python dependencies (apt-get
packages)
NOTE: Don't create a .sh file and run it all at once. It will not work. Copy, paste, and execute each command below manually. :-)
# DO NOT RUN THIS AS A ROOT USER
from kivy.app import App | |
from kivy.lang import Builder | |
from kivy.properties import OptionProperty | |
from kivy.core.window import Window | |
from kivy.factory import Factory | |
KV = ''' | |
#:import A kivy.animation.Animation | |
<RLabel@Label>: |
from kivy.app import runTouchApp | |
from kivy.lang import Builder | |
from kivy.uix.button import Button | |
from kivy.garden.moretransitions import ( | |
PixelTransition, RippleTransition, BlurTransition, RVBTransition, | |
RotateTransition, TileTransition, FastSlideTransition, | |
) | |
ALL_TRANSITIONS = ( | |
PixelTransition, RippleTransition, BlurTransition, RVBTransition, |
[ | |
{ | |
"id": "a5f5fa2877f55e9a", | |
"type": "tab", | |
"label": "Main Flow", | |
"disabled": false, | |
"info": "", | |
"env": [] | |
}, | |
{ |