This file contains 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 Debian 11 is ran on a LXC container (Proxmox), SSH login and sudo actions can be slow | |
# Check if in /var/log/auth.log the following messages | |
Failed to activate service 'org.freedesktop.login1': timed out (service_start_timeout=25000ms) | |
-> Run systemctl mask systemd-logind | |
-> Run pam-auth-update (and deselect Register user sessions in the systemd control group hierarchy) |
This file contains 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 "Poco/Net/HTTPServer.h" | |
#include "Poco/Net/HTTPRequestHandler.h" | |
#include "Poco/Net/HTTPRequestHandlerFactory.h" | |
#include "Poco/Net/HTTPServerParams.h" | |
#include "Poco/Net/HTTPServerRequest.h" | |
#include "Poco/Net/HTTPServerResponse.h" | |
#include "Poco/Net/HTTPServerParams.h" | |
#include "Poco/Net/ServerSocket.h" | |
#include "Poco/Timestamp.h" | |
#include "Poco/DateTimeFormatter.h" |
This file contains 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
#define MAX_CONTROLLERS 4 | |
class JoypadController { | |
public: | |
JoypadController() : m_is_connected(false), m_gamepad(0), m_instance_id(-1), m_haptic(0) {} | |
int JoypadController::processEvent(const SDL_Event& event); | |
private: | |
SDL_GameController *m_gamepad; | |
SDL_Haptic *m_haptic; |
This file contains 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
cdef extern from "i386/types.h" nogil: | |
ctypedef signed char int8_t | |
ctypedef short int16_t | |
ctypedef int int32_t | |
ctypedef long long int64_t | |
cdef extern from "iconv.h" nogil: | |
ctypedef void *iconv_t | |
cdef extern from "stdlib.h" nogil: |
This file contains 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
// fun.cpp | |
extern "C" | |
{ | |
#include <lua.h> | |
#include <lauxlib.h> | |
#include <lualib.h> | |
} | |
#include <iostream> |
This file contains 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
'''read a csv file representing a table and write a restructured text simple | |
table''' | |
import sys | |
import csv | |
def get_out(out=None): | |
''' | |
return a file like object from different kinds of values | |
None: returns stdout | |
string: returns open(path) |