This file contains hidden or 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
| ii -s irc.homelien.no -n botname -i ./irc | |
| echo "/join #some_channel" > irc/irc.homelien.no/in | |
| tail -n 0 -f irc/irc.homelien.no/#some_channel/out | stdbuf -oL -eL grep -v -- '-!-' | sed -u -r -e 's/(")//g' -e "s/(')//g" -e 's/.*<([^>]*)>\s(.*)/{ "nick":"\1", "msg":"\2" }/' | while read D; do echo "$D"; curl | |
| --header "Content-Type: application/json" --request POST --data "$D" https://home-assistant:8123/api/webhook/irc_tts; done | |
| home-assistant/config/automations.yaml: | |
| - id: 'irc-tts' |
This file contains hidden or 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
| - id: 'cube-toggle-office' | |
| alias: Toggle lights on double tap | |
| description: 'Toggle lights on double tap (desc)' | |
| trigger: | |
| - event_data: | |
| gesture: 6 | |
| id: mi_magic_cube | |
| event_type: deconz_event | |
| platform: event | |
| condition: |
This file contains hidden or 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
| - id: 'cube-adjust-brightness-rotation' | |
| alias: Adjust brightness based on rotation | |
| description: 'Adjust brightness based on rotation (desc)' | |
| trigger: | |
| - platform: event | |
| event_type: deconz_event | |
| event_data: | |
| id: switch_6 # analog events | |
| condition: | |
| condition: template |
This file contains hidden or 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
| guessit CSI\ Crime\ Scene\ Investigation\ -\ S11E10\ -\ 418-427.avi | |
| For: CSI Crime Scene Investigation - S11E10 - 418-427.avi | |
| GuessIt found: { | |
| "title": "CSI Crime Scene Investigation", | |
| "season": 11, | |
| "episode": [ | |
| 10, | |
| 418, | |
| 419, | |
| 420, |
This file contains hidden or 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
| 2018-12-01 21:58:02 DEBUG SHOWQUEUE-ADD :: [54da0c7] Parsed CSI Crime Scene Investigation - S11E10 - 418-427 into title: CSI Crime Scene Investigation, season: 11, episode: [10, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427], type: episode, parsing_time: 0.0228800773621, total_time: 0.0232539176941, absolute_episode: [], quality: Unknown | |
| 2018-12-01 21:41:03 DEBUG SHOWQUEUE-REFRESH :: [54da0c7] Parsed Grey's Anatomy - S14E09 - 1-800-799-7233 into title: Grey's Anatomy, season: 14, episode: [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, |
This file contains hidden or 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
| config.txt: dtoverlay=dwc2 | |
| cmdline.txt: modules-load=dwc2,g_ether g_ether.host_addr=5a:53:4c:b9:75:cf g_ether.dev_addr=5a:77:1e:af:8e:9e | |
| ssh: 1 | |
| /etc/network/interfaces.d/usb0 | |
| auto usb0 | |
| allow-hotplug usb0 | |
| iface usb0 inet dhcp |
This file contains hidden or 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
| i1s16:TDRawDeviceEvent95:class:command | |
| protocol:arctech | |
| model:selflearning | |
| house:12910990 | |
| unit:11 | |
| group:0 | |
| method:turnon | |
| i1s13:TDDeviceEventi2si1s0:16:TDRawDeviceEvent94:class:command | |
| protocol:arctech | |
| model:selflearning |
This file contains hidden or 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
| what happens: | |
| >>> a = [ "ø", "å" ] | |
| b = [ "\\x{F8}", "\\x{E5}" ] | |
| >>> b | |
| ['\\x{F8}', '\\x{E5}'] | |
| >>> "øremål".replace(a,b) | |
| Traceback (most recent call last): | |
| get_non_ascii(): | |
| File "<stdin>", line 1, in <module> |
This file contains hidden or 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
| à \x{E0} | |
| á \x{E1} | |
| ä \x{E4} | |
| å \x{E5} | |
| æ \x{E6} | |
| ç \x{E7} | |
| è \x{E8} | |
| é \x{E9} | |
| ê \x{EA} | |
| ï \x{EF} |
This file contains hidden or 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
| def get_cat_domains(): | |
| #whois = telnetlib.Telnet("whois.norid.no", 43) | |
| #whois.write("-c utf-8 NNRI4O-NORID\n".encode('ascii')) | |
| #result = whois.read_all() | |
| #whois.close() | |
| #print(result.decode('utf-8')) | |
| a_file = open('whois.txt', encoding='utf-8') | |
| s = a_file.read() | |
| #print(s) | |
| r = re.search('^Domains\.*: (.*)', s, re.MULTILINE) |