Skip to content

Instantly share code, notes, and snippets.

@nicfit
nicfit / disable-gnome-extensions.sh
Last active January 31, 2024 06:51
Disable all gnome-shell extensions from command line.
for ext in $(/usr/bin/ls ~/.local/share/gnome-shell/extensions); do
gnome-shell-extension-tool -d $ext;
done
@nicfit
nicfit / gist:5b4ab43f976c19d098d4c2ba7bcf438d
Last active September 14, 2017 04:38
An example opf how to mix asyncio API in libraries that don't support the syntax
try:
# The following `run_async` function is compiled at runtime
# because it contains syntax which is not supported on older Python
# versions. (A 'return' inside a generator.)
six.exec_(textwrap.dedent('''
def run_async(self, reset_current_buffer=True, pre_run=None):
"""
Same as `run`, but this returns a coroutine.
This is only available on Python >3.3, with asyncio.

Keybase proof

I hereby claim:

  • I am nicfit on github.
  • I am nicfit (https://keybase.io/nicfit) on keybase.
  • I have a public key whose fingerprint is DFD5 E653 BE7A 41FB 13A6 A191 49AC 0501 CF57 20D2

To claim this, I am signing this object:

Verifying that +nicfit is my blockchain ID. https://onename.com/nicfit