Skip to content

Instantly share code, notes, and snippets.

View zhovner's full-sized avatar
🐋

Pavel Zhovner zhovner

🐋
View GitHub Profile
@zhovner
zhovner / dev.flipp.TimeMachineTraveler.plist
Created September 5, 2021 22:30
Launchd script from time machine traveler
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>InitGroups</key>
<false/>
<key>Label</key>
<string>dev.flipp.TimeMachineTraveler</string>
<key>Program</key>
<string>/Users/ivan/travel-time-machine/travel-time-machine.py</string>
@zhovner
zhovner / time-machine-travel.py
Last active September 5, 2021 22:26
Time Machine helper for travelers
#!/opt/homebrew/bin/python3
###################################################
# Remote Time Machine helper for remote SMB share #
# Run backup only if SMB server speed is high #
###################################################
### Requirements:
# brew install iperf3 python3
@zhovner
zhovner / gist:f1acf967835daa69e47cda090fe291c2
Created August 11, 2021 15:12
pn532-tamashall-debug-aux1
#!/usr/bin/env pn53x-tamashell
02; // Get PN532 Firmware Version
// Set Debug Bits. Read more here on page 185 https://www.nxp.com/docs/en/nxp/data-sheets/PN532_C1.pdf
// Syntax: 08 63 28 NN
// Where NN Byte is a register byte for AUX1 and AUX2
//08 63 28 56; Set AUX1 to ADC_I state and AUX2 to ADC_Q
08 63 28 50; Set AUX1 to ADC_I state and AUX2 to nothing
@zhovner
zhovner / stlink-1.5.1.rb
Last active September 29, 2020 14:19
Old verstion of st-flash
const
// Begining APDU command. "Payment System Environment (PSE)" 2pay.sys.ddf01
// The card should response with Application Identifier (AID)
PPSE = '00 a4 04 00 0e 32 50 41 59 2e 53 59 53 2e 44 44 46 30 31 00';
// Application Identifier (AID) start command prefix
// Possible AID's:
// A0000000031010 Visa International
// A0000000032020 Visa International
// A0000000041010 Mastercard International
with AWS.Status;
with AWS.Response;
package Worker_Echoes.Apple.Captive is
function Service (Request : AWS.Status.Data)
return AWS.Response.Data;
end Worker_Echoes.Apple.Captive;
@zhovner
zhovner / avrdude-6.0.1_olimex-avr-isp-mk2.patch
Last active March 21, 2016 12:21
Patch for avrdude-6.0.1 and AVR-ISP-MKII
Index: stk500v2.c
===================================================================
--- stk500v2.c (6.0.1)
+++ stk500v2.c (working copy)
@@ -1618,9 +1618,9 @@
baud = USB_DEVICE_AVRISPMKII;
PDATA(pgm)->pgmtype = PGMTYPE_AVRISP_MKII;
pgm->set_sck_period = stk500v2_set_sck_period_mk2;
- pgm->fd.usb.max_xfer = USBDEV_MAX_XFER_MKII;
- pgm->fd.usb.rep = USBDEV_BULK_EP_READ_MKII;
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>prehensile.networkwatcher</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>
Device #1: Hawaii, 3072MB, 1000Mhz, 44MCU
Device #2: Hawaii, 3072MB, 1000Mhz, 44MCU
Device #3: Hawaii, 3072MB, 1000Mhz, 44MCU
Device #4: Hawaii, 3072MB, 1000Mhz, 44MCU
Hashtype: MD4
Workload: 1024 loops, 256 accel
Speed.GPU.#1.: 22029.8 MH/s
Speed.GPU.#2.: 22070.9 MH/s
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'