This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date, timedelta | |
class Day(date): | |
@property | |
def 的昨天(self): | |
return self + timedelta(days=-1) | |
@property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
input="ip" | |
unset transcribing | |
begin_pattern="[red]" | |
end_pattern="" | |
while read -r var | |
do | |
if [[ -v transcribing ]] ; then | |
if [ "$var" == "$end_pattern" ] ; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | |
ether=[iPhone's MAC address] | |
iface=[interface via witch the host connects to the iPhone] | |
mdns_ip=224.0.0.251 #the multicast address used by mDNS | |
#lookup iPhone's IP from its MAC address | |
ip_raw=$(arp -n -H ether -i $iface | grep $ether ) | |
if [[ -z "$ip_raw" ]] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-----------------First Instance----------------------- | |
Looking for configuration file at full path "/etc/shairport-sync-btspeaker.conf" | |
Value read for buffer size is 100. | |
alsa output device name is "IC-BTS04". | |
The processor is running little-endian. | |
Version: "3.2.1-OpenSSL-Avahi-ALSA-soxr-sysconfdir:/etc" | |
statistics_requester status is 0. | |
daemon status is 0. | |
deamon pid file path is "/var/run/shairport-sync/shairport-sync.pid". |