Skip to content

Instantly share code, notes, and snippets.

@Zagrebelin
Zagrebelin / gist:9332161
Created March 3, 2014 19:02
telnet: protocol handler. Actualy it's wrapper around SecureCrt.
import urlparse
import sys
from subprocess import Popen
urlparse.uses_params += ['telnet',]
class HelpException(Exception):
pass
@Zagrebelin
Zagrebelin / gist:8142153
Created December 27, 2013 03:16
Помогаем делать первые шаги в питоне. Правим вот этот скрипт http://clubs.ya.ru/python/replies.xml?item_no=2698
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# abook.py
#
import string
import datetime
import os
@Zagrebelin
Zagrebelin / gist:7508380
Created November 17, 2013 02:35
Select several objects in Microsoft Visio and export them to .png file
Sub Macro1()
'Enable diagram services
Dim DiagramServices As Integer
DiagramServices = ActiveDocument.DiagramServicesEnabled
ActiveDocument.DiagramServicesEnabled = visServiceVersion140
Application.Settings.SetRasterExportResolution visRasterUseScreenResolution, 96#, 96#, visRasterPixelsPerInch
Application.Settings.SetRasterExportSize visRasterFitToSourceSize, 8.979167, 2.197917, visRasterInch
Application.Settings.RasterExportDataFormat = visRasterInterlace