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
| #include <functional> | |
| #include <cstdio> | |
| #include <thread> | |
| #include <chrono> | |
| #include <pybind11/pybind11.h> | |
| #include <pybind11/functional.h> | |
| namespace py = pybind11; |
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 csv | |
| import os | |
| import subprocess | |
| import time | |
| KEYDIR = os.path.dirname(os.path.abspath(__file__)) | |
| PAGEANT_EXE = 'C:/tools/putty/pageant.exe' | |
| def running_processes(): | |
| s = subprocess.check_output(['tasklist.exe', '/fo', 'csv']).decode('cp437') |
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
| #include <cstdio> | |
| #include <cstring> | |
| #include <cstdlib> | |
| #include <cstdarg> | |
| #include <string> | |
| #include <vector> | |
| #include <map> | |
| #include <algorithm> |
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
| #ifndef STRINGREF_H | |
| #define STRINGREF_H | |
| #include <string> | |
| #include <algorithm> | |
| template<class StringT> | |
| class BasicStringRef | |
| { | |
| public: |
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
| if {$argc > 0} then { | |
| set infile [open [lindex $argv 0]] | |
| set doclose 1 | |
| set varname [string map {/ _ . _ - _} [lindex $argv 0]] | |
| } else { | |
| set infile stdin | |
| set doclose 0 | |
| set varname stdin | |
| } |
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
| /* | |
| * Use as you wish | |
| */ | |
| static int my_inet_pton(int family, const char *src, void *dst) | |
| { | |
| int rc; | |
| struct sockaddr_storage addr; | |
| int addr_len; |
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
| # usage: | |
| # | |
| # $ virtualenv venv | |
| # $ ./venv/bin/pip install sleekxmpp dnspython | |
| # $ ./venv/bin/python peptest.py -j foo@bar.com -p secretpassword --subscribe other@bar.com/other -d | |
| import sys | |
| import os | |
| import ssl | |
| import logging |