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
| rmvm vm1 -p | |
| rmdef vm1 | |
| mkdef vm1 groups=vm,all \ | |
| ip=192.168.122.2 \ | |
| mgt=kvm \ | |
| vmcpus=2 \ | |
| vmhost=kvmhost \ | |
| vmmemory=2048 \ | |
| vmnics=virbr0 \ | |
| vmnicnicmodel=rtl8139 \ |
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
| https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/changing-the-default-boot-entry |
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 max_(iterator): | |
| try: | |
| n = next(iterator) | |
| except TypeError: | |
| return max_(iter(iterator)) | |
| except StopIteration: | |
| return | |
| else: | |
| rest = max_(iterator) | |
| return n if rest is None or n > rest else rest |
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
| http GET https://accounts.google.com/o/oauth2/v2/auth redirect_uri==http://localhost:8000/accounts/google/login/callback/ response_type==code client_id==419312690453-o4grg1t8isrjbljfnnno7c7jj520fpao.apps.googleusercontent.com scope==https://www.googleapis.com/auth/calendar.readonly access_type==offline prompt==consent -v |
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
| from functools import reduce | |
| def compose(f, g): | |
| def composed(*args, **kwargs): | |
| return f(g(*args, **kwargs)) | |
| return lambda *args, **kwargs: f(g(*args, **kwargs)) | |
| class Compose: |
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
| import re | |
| with open('/proc/interrupts') as f: | |
| lines = f.readlines()[1:] | |
| interrupts = {} | |
| for line in lines: | |
| interrupt, counters = line.split(':', 1) | |
| interrupts[interrupt] = sum(int(c) for c in counters.split() if re.match(r'^\s*\d+\s*$', c) is not None) | |
| for i, c in sorted(interrupts.iteritems(), key=lambda pair: pair[1], reverse=True): |
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
| #!/usr/bin/python | |
| import sys | |
| import os.path | |
| import re | |
| from subprocess import check_call | |
| def main(path): | |
| entries = [] | |
| with open(path, 'r') as f: | |
| for line in f.readlines(): |
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
| " vim use the first python interpreter that is | |
| " loaded. This force it to load python3 :-) | |
| " py3 pass | |
| " fish shell is not posix. This leads to errors | |
| " while VundleInstall. This fix it | |
| set shell=bash | |
| syntax on | |
| set background=dark |
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
| " vim use the first python interpreter that is | |
| " loaded. This force it to load python3 :-) | |
| " py3 pass | |
| " fish shell is not posix. This leads to errors | |
| " while VundleInstall. This fix it | |
| set shell=bash | |
| syntax on | |
| set background=dark |
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
| /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -O2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.7 -Wall -W -fPIC -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/opt/qt/5.5/clang_64/lib/QtCore.framework/Headers -I. -I/opt/qt/5.5/clang_64/mkspecs/macx-clang -F/opt/qt/5.5/clang_64/lib -o qtdetail.o qtdetail.cpp | |
| warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found] | |
| In file included from qtdetail.cpp:1: | |
| In file included from /opt/qt/5.5/clang_64/lib/QtCore.framework/Headers/QCoreApplication:1: | |
| In file included from /opt/qt/5.5/clang_64/lib/QtCore.framework/Headers/qcoreapplication.h:37: | |
| /opt/qt/5.5/clang_64/lib/QtCore.framework/Headers/qglobal.h:39:12: fatal error: 'cstddef' file not found | |
| # include <cstddef> | |
| ^~~~~~~~~ | |
| 1 warning and 1 error generated. |