A quick guide to setting up keyboard shortcuts for a push-to-talk microphone.
-
Install xbindkeys:
sudo apt install xbindkeys
-
Find the required keycode for
xbindkeys
:touch $HOME/.xbindkeysrc
xbindkeys --key
#!/usr/bin/env python3 | |
# | |
# Copyright (c) 2021 Jasper Lievisse Adriaanse <[email protected]> | |
# | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
""" Stamp a Win32 binary with version information. | |
Original code from pywin32 module. | |
Modified to only use ctypes, making it standalone. | |
""" | |
import ctypes | |
import os | |
import struct | |
import glob |
A quick guide to setting up keyboard shortcuts for a push-to-talk microphone.
Install xbindkeys:
sudo apt install xbindkeys
Find the required keycode for xbindkeys
:
touch $HOME/.xbindkeysrc
xbindkeys --key
#if BOOST_VERSION >= 106000 | |
+if (boost::python::converter::registry::query( | |
+ boost::python::type_id <boost::shared_ptr<alert> >()) == NULL) { | |
register_ptr_to_python<boost::shared_ptr<alert> >(); | |
+} |
import os | |
new_lines = [] | |
os.chdir('/home/ubuntu/deluge.git/') | |
patchfile = '0001-Fix-pylint-warnings.patch' | |
with open(patchfile) as file_: | |
for line in file_.readlines(): | |
line_strip = line.lstrip('-').lstrip('+').strip() | |
if '"' in line and not "'" in line and not '"""' in line and not '\\"' in line: |
{ | |
"file": 2, | |
"format": 1 | |
}{ | |
"show_progress": true, | |
"seeding_time_width": 10, | |
"show_remaining": false, | |
"ratio_width": 10, | |
"remaining_width": 13, | |
"downloading_time_width": 10, |
- repo: git://github.com/pre-commit/pre-commit-hooks | |
sha: 8e0d7bab601ce6a8775ea98082938e60fc80eb7f | |
hooks: | |
- id: trailing-whitespace | |
- id: check-merge-conflict | |
- id: flake8 | |
- id: check-ast | |
# - id: double-quote-string-fixer | |
# - id: end-of-file-fixer | |
# - id: fix-encoding-pragma |
import json | |
import urllib | |
series = json.load(urllib.urlopen('https://api.launchpad.net/1.0/ubuntu/series')) | |
print [entry['name'] for entry in series['entries'] if entry['supported']] |
# List mounts | |
systemctl -t mount | |
# Unit starts after mount and unit is stopped when any of the mounts suddenly disappears. | |
After=xyz.mount | |
BindsTo=xyz.mount | |
# Also look at RequiresMountsFor |
deluge.tests.test_log | |
LogTestCase | |
test_twisted_error_log ... 22:01:12.170 [ERROR ][deluge.log:284 ] ('Unhandled error in Deferred:',) | |
22:01:12.171 [ERROR ][deluge.log:284 ] [Failure instance: Traceback (failure with no frames): <class 'deluge.component.ComponentException'>: Trying to start a component ('EventManager') not in stopped state. Current state: 'Paused' | |
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1039, in _inlineCallbacks | |
result = g.send(result) | |
File "/home/ubuntu/deluge.git/deluge/tests/test_log.py", line 48, in call | |
yield component.start(["EventManager"]) | |
File "/home/ubuntu/deluge.git/deluge/component.py", line 298, in start | |
deferreds.append(self.components[name]._component_start()) |