Referenced from https://www.bernhard-baehr.de
use de.bernhard-baehr.sleepwatcher-20compatibility-localuser.plist from config folder follow instructions. Remember to chmod required files including the .wakeup in home directory.
| sub asciiVowelCount { | |
| my $str = shift; | |
| # return error since this is not ascii character set | |
| return -1 if $str =~ /[^[:ascii:]]/; | |
| my $count = 0; | |
| # Loop over each chracter in $str and increment counter if it is a vowel |
| if not os.path.exists(self.path): | |
| raise OSError( | |
| errno.ENOENT, os.strerror(errno.ENOENT), self.path | |
| ) | |
| if not os.path.isfile(self.path + self.file): | |
| raise OSError( | |
| errno.ENOENT, os.strerror(errno.ENOENT), self.file | |
| ) |
| def testValidatePathFile(self): | |
| with self.assertRaises(OSError) as cm: | |
| # self.handle.__ValidatePathFile() | |
| self.handle = exceptman.ExceptionListManager(path="/tm") | |
| err = cm.exception | |
| self.assertEqual(str(err), "[Errno 2] No such file or directory: '/tm'") | |
| #!/usr/bin/env bash | |
| # Backup a Plex database. | |
| # Author Scott Smereka | |
| # Ubuntu | |
| # Version 1.0 | |
| # Modified by Shaun Harrison | |
| # Ubuntu | |
| # Version 1.1 |
| set diskIsMounted to false | |
| repeat until diskIsMounted is true | |
| delay 30 | |
| tell application "Finder" | |
| if (disk "Drobo" exists) then | |
| set diskIsMounted to true | |
| end if | |
| end tell | |
| end repeat |
| # Current under Dev | |
| #Drobo Dashboard does not appear to respond to quit command. | |
| # Drobo is the name of the drive to be unmounted. This should be changed to | |
| # your own needs. | |
| tell application "NordVPN" to quit | |
| tell application "Plex Media Server" to quit | |
| tell application "Dropbox" to quit | |
| tell application "Drobo Dashboard" to quit |
| perl -MDevel::Modlist=options program.pl |
Referenced from https://www.bernhard-baehr.de
use de.bernhard-baehr.sleepwatcher-20compatibility-localuser.plist from config folder follow instructions. Remember to chmod required files including the .wakeup in home directory.
example usage in my case
def json():
return json.dumps(self.__dict__,default=lambda o: o.__dict__,
ensure_ascii=False,indent=4)| def test_python2TooLow(): | |
| with mock.patch.object(sys, 'version_info') as v_info: | |
| v_info.major = 2 | |
| v_info.minor = 7 | |
| assert helper.system.meetsMinSpecs(3, 0) == False |