Search
New Code
Dynamics CRM Inventory Manager Plugin 1.0
Overstock Script 1.0.3
C# HTML to PDF 4.4.6.2
AnyGantt JS Gantt Charts 8.2.0
SentiVeillance SDK Trial 6.0.176566
Popup extension for Magento 2 2.2.x
Excel Add-in for Shopify 1.7
PHP Classified Script 1.0.3
Popup For Magento 2 2.2.x
Desktop Live Streaming SDK - Screen2Video Gold ActiveX 5.2
ODBC Driver for PostgreSQL 2.3
WooCommerce Product Customizations 1.0
Apartment Rental Software 1.0.3
Verj.io 1.1
Order ODBC Driver for MySQL 2.3
Top Code
Output Messenger 1.8.0
Aliexpress Clone- Ec21 Script 1
Indiegogo Clone 3.0
PHP Image Resize Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
Travel Portal Script 9.29
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Deals and Discounts Website Script 1.0.2
Readymade MLM Products 2.01
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Code Listing by Dima Tisnek

Code 1-6 of 6   






Linux Network Block Device server in Python

This is a simplified version based on Kragen Sitaker's http://lists.canonical.org/pipermail/kragen-hacks/2004-May/000397.html

Close is never actually called, at least not on the same connection -- linux C nbd-client -d seems to stall, perhaps it tries to open another socket?

This code doesn't check for error conditions, failed reads/writes, past end of disk, etc.



Example shows how to unset gtk engine'd look for a particular widget.

gtk.Widget.modify_xx allows you to override simple properties, like backgrounds (unless theme uses an engine) and text color (sometimes (?))
gtkrc allows you to...



execnet ( http://codespeak.net/execnet/ ) is pretty cool, but its ssh support needs a few tweaks, here they are.

This snipped is a monkey patch, not a diff, import it and you can use execnet.makeportgateway instead of makegateway.



Patches needed to install pycurl into python3



Splits a string into BER TLV's and returns a dict of {type(hex): value(binary)}
Doesn't interpret tags, Descend into compound tags.



What this recipe does:

Maps linux usb hid ioctls and related C structs to python;
Call ioctls, make some sense of output.
Prints all reports for the device with some info.

Works with python 2.4 (tested python 2.4.6...