Archive for the ‘Programming’ Category

Patched Python Paramiko 1.7.7.1 Windows 32 and 64 bit installers

on Wednesday 16th November, 2011 Gabe speculated thusly…

Taking the Latest code from Robey the Paramiko maintainer and applying a patch submitted by Jaraco at:
https://github.com/jaraco/paramiko/commit/1939b1c55270bf7a92fdb1d43208a3b65342f4b2
these builds of Paramiko will not suffer from the following Exception:
File "C:\Python27\lib\site-packages\paramiko\agent.py", line 118, in _read_all
raise SSHException('lost ssh-agent')
SSHException: lost ssh-agent

Most notably the 64bit version will not suffer this problem, the 32bit versions never did. More details on the issue can be found here:
https://bugs.launchpad.net/bzr/+bug/644995
and here:
https://bugs.launchpad.net/paramiko/+bug/736955

32bit Installer:
paramiko-1.7.7.1.win32_Jaraco_patch

64bit Version for Windows and Python 64bit (AMD/Intel):
paramiko-1.7.7.1.win-amd64_Jaraco_patch

Posted in Programming, Python

No Comments »

Python PyCrypto 2.4.1 32 and 64 bit Windows 32/x64 AMD/Intel Installers Python 2.7

on Monday 14th November, 2011 Gabe speculated thusly…

Python PyCrypto 2.4.1 64bit and 32 bit Windows x64 AMD/Intel Installer.

Frustrated that there were only 32 bit builds available. I compiled and tested this as working using Python 2.7.2 64 bit running on Windows 7 64bit.

32 bit version:
pycrypto-2.4.1.win32-py2.7

64 bit version for x64 Python installs on 64bit Windows
pycrypto-2.4.1.win-amd64-py2.7

Posted in Programming, Python

No Comments »

Python paramiko 1.7.7.1 Windows 32 and 64 bit installers

on Monday 14th November, 2011 Gabe speculated thusly…

For your convenience. Please find below installers for 32 and 64 bit versions. Works with Python 2.7. Choose the correct installer for your Python installation.

paramiko-1.7.7.1.win32

paramiko-1.7.7.1.win-amd64

Posted in Programming, Python

No Comments »

Python PyCrypto 2.0.1 64bit Windows x64 AMD/Intel Installer

on Monday 14th November, 2011 Gabe speculated thusly…

Python pycrypto-2.0.1.win-amd64-py2.7.exe 64bit Windows x64 AMD/Intel Installer.

Frustrated that there were only 32 bit builds available. I compiled and tested this as working using Python 2.7.2 64 bit running on Windows 7 64bit.

pycrypto-2.0.1.win-amd64-py2.7

Posted in Programming, Python

No Comments »

Python setuptools 0.6c11 64bit Windows x64 AMD/Intel Installer

on Monday 14th November, 2011 Gabe speculated thusly…

Found 32 bit versions knocking about but no 64bit, thought some like-minded people might appreciate a 64 bit build. Have compiled and tested this as working using Python 2.7.2 64 bit running on Windows 7 64bit.
setuptools-0.6c11.win-amd64

Posted in Programming, Python

No Comments »

selecting in to a same table in mysql

on Friday 19th November, 2010 Gabe speculated thusly…

create temporary table XYZ
select * from category_to_store where store_id = 0
;
insert into category_to_store
select category_id, 1 from XYZ
;

Posted in MySQL, Programming

No Comments »

Effectively repair MySQL Tables

on Wednesday 27th January, 2010 Gabe speculated thusly…

$ cd /var/lib/mysql

find -type f -name '*.MYI' -exec myisamchk --silent --force --fast --update-state --key_buffer_size=64M --sort_buffer_size=64M --read_buffer_size=1M --write_buffer_size=1M {} \;

Posted in Development, HowTo, Information, Linux, MySQL, Operating System, Programming

No Comments »

Access denied for user ‘debian-sys-maint’@'localhost’ (using password: YES)

on Tuesday 26th January, 2010 Gabe speculated thusly…

Find your debian-sys-maint password in /etc/mysql/debian.cnf.

GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY ' ' WITH GRANT OPTION;

Replace with your debian-sys-maint password.

Posted in Debian, Development, MySQL, Operating System, Ubuntu

No Comments »

Creating a PHP array of ISO 3166-1 Country Codes

on Thursday 7th January, 2010 Gabe speculated thusly…

I recently came across http://opencountrycodes.appspot.com/ which has an ISO 3166-1 list of country codes for various programming languages. I wanted to generate an HTML drop down list for customer to choose from based on these codes. However, there is no PHP version provoided. So taking the XML version found at http://opencountrycodes.appspot.com/xml/ I made a trivial script that would take the codes found in the XML document and organise them in to a PHP array called $XML2PHPCountryCodes and save that array in a file called country_names.php. The output file can then be included in any PHP script making the contained array available.

< ?php
$str = file_get_contents('http://opencountrycodes.appspot.com/xml/');
$xml = new SimpleXMLElement($str);
$out = '$countries'." = array(\n";
foreach ($xml->country as $country)
{
	$out .= "'{$country['code']}' => \"{$country['name']}\",\n";
}
$out .= ");";

file_put_contents('country_names.php', $out);

Posted in Development, PHP, Programming

3 Comments »

Bzr over SMB/CIFS using SMBMOUNT

on Wednesday 16th September, 2009 Gabe speculated thusly…

Ensure that the remote uig and gid are set correctly!

smbmount //foo/bar /media/bar -o username=myusername, password=mypassword, dir_mode=0755, file_mode=0664, noperm, uid=501, gid=501

Posted in Bazaar, Development, Programming, Revision Control, Server

No Comments »