A basic example of using the higher level asyncio constructs such as streams in a server and client where both pass messages with regular cadence.
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
Object.prototype.removeItem = function (key) { | |
if (!this.hasOwnProperty(key)) | |
return | |
if (isNaN(parseInt(key)) || !(this instanceof Array)) | |
delete this[key] | |
else | |
this.splice(key, 1) | |
}; |
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
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
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://daily.dev/blog/get-to-know-asynchio-multithreaded-python-using-asyncawait | |
import asyncio | |
import threading | |
async def main(): | |
result = await asyncio.to_thread(blocking_func) | |
print(result) | |
asyncio.run(main()) |
// https://learn.microsoft.com/en-us/sysinternals/downloads/debugview
- Under Windows 9x/Me DebugView can capture output from the following sources:
- Win32 OutputDebugString
- Win16 OutputDebugString
- Kernel-mode Out_Debug_String
- Kernel-mode _Debug_Printf_Service
- Under Windows NT and Win2k DebugView can capture:
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
# xRDP – The Infamous “Authentication Required to Create Managed Color Device” Explained | |
# https://c-nergy.be/blog/?p=12073 | |
# /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf | |
# | |
# | |
polkit.addRule(function(action, subject) { | |
if ((action.id == "org.freedesktop.color-manager.create-device" || | |
action.id == "org.freedesktop.color-manager.create-profile" || | |
action.id == "org.freedesktop.color-manager.delete-device" || | |
action.id == "org.freedesktop.color-manager.delete-profile" || |
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
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash | |
apt-get install libpixman-1-dev | |
apt-get install build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev | |
apt-get install libxi-dev | |
apt-get install libgl-dev |
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 <windows.h> | |
#include <stdio.h> | |
#define WIDTH 120 | |
#define HEIGHT 30 | |
float playerX = 0; | |
float playerY = 0; | |
float dx = 0,dy = 0; |
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/python3 | |
''' | |
Copyright (C) Saeed Gholami Shahbandi. All rights reserved. | |
Author: Saeed Gholami Shahbandi | |
This file is free software: you can redistribute it and/or modify it | |
under the terms of the GNU Lesser General Public License as published | |
by the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. This program is distributed in | |
the hope that it will be useful, but WITHOUT ANY WARRANTY; without |
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/python3 | |
''' | |
Copyright (C) Saeed Gholami Shahbandi. All rights reserved. | |
Author: Saeed Gholami Shahbandi | |
This file is free software: you can redistribute it and/or modify it | |
under the terms of the GNU Lesser General Public License as published | |
by the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. This program is distributed in | |
the hope that it will be useful, but WITHOUT ANY WARRANTY; without | |
even the implied warranty of MERCHANTABILITY or FITNESS FOR A |