Autarchy of the Private Cave

Science, Society, Programming and Hobbies

  • Exits

  • Categories

  • Archives

  • Visitors' track

    Locations of visitors to this page
  • Tags list

    • Web Hosting

    • Blog sponsors

    • Earn and spend


    • Exits

    • Ratings

      Science Blogs - Blog Top Sites website monitoring service

    Archive for the 'Notepad' Category

    Short miscellaneous notes

    Drupal theme development: where to start

    8th June 2008

    Simplest way to develop your custom Drupal theme is to start with some skeleton/wireframe theme.

    In this post, I’m briefly reviewing 4 themes (atck, blueprint, framework, and zen), made specifically to serve as theme developer’s starting point. All 4 are listed with their features (as per Drupal project page of each one), with my personal “impressions” (not based on actual use experience, yet). There’s also my choice and order of preference for the 4 candidates at the end.
    Read the rest of this entry »

    Share This

    Posted in Drupal, Links, Notepad, Software, Web, XHTML/CSS | 5 Comments »

    Ad Unit Guidelines

    7th June 2008

    When either consulting on a new website design, or actually designing one, keep in mind Ad Unit Guidelines if the website is going to use advertising. The list is far not exhaustive, but sufficiently standard.

    Share This

    Posted in Links, Notepad, Web, XHTML/CSS | No Comments »

    100 legal sources for free stock images

    5th June 2008

    100 legal sources for free stock images (via maxon’s delicious bookmark)

    Share This

    Posted in Links, Notepad | No Comments »

    An alternative to shared hosting

    4th June 2008

    Personal communication resulted in a link to slicehost, who provide VDS/VPS services at prices as low as 20$/mo, which is comparable in price to good shared hosting plans, and is cheaper than Dedicated plans.

    I’m considering a move from shared hosting, and found Slicehost attractive. For 20$/mo, you get guaranteed 256MiB RAM, 10GiB disk and 100GiB traffic, which is sufficient to host several under-1k-per-day sites.

    The only thing which isn’t spoken aloud is the guaranteed CPU speed. Based on the numbers provided: 16GiB total RAM per server, quad-core CPU, and CPU quotas set equivalently to RAM quotas, I came to a conclusion that 20$-plan guarantees ~125MHz of CPU (take 16 GiB, multiply by 4 20$-plans - you get 64 “slices” - virtual servers; quad core CPUs were quoted as 8+GHz - I assume that’s the sum of the core frequencies, thus 8GHz divided by 64 slices gives as little as 125MHz guaranteed per slice).

    The better slice you buy - the more CPU is guaranteed, so for 1024-RAM slice you’d have a minimum of 500MHz of CPU.

    However, slicehost describes their CPU-clamping system as the one allowing “bursted” performance, if others aren’t actively using their CPU shares. So it must be much better than what I’m calculating here. And even if it’s not, then for some applications it’s better to have a 125MHz-clamp on CPU, than have a 20-seconds maximal CPU time limit.

    Still, I’m looking for reasonably-priced collocation services in Ukraine - e.g. those (currently unavailable) from Volia, starting at 40$/mo for the rented physical VIA C7-based server with enough traffic included.

    Share This

    Posted in Hardware, Links, Notepad, Web | No Comments »

    Flash video in Drupal (links)

    6th May 2008

    Some things to be aware of when enhancing Drupal site with FLV video playing/conversion features.

    Share This

    Posted in CMS, Drupal, Links, Notepad, Software, Web | 1 Comment »

    NicEdit

    11th April 2008

    NicEdit - lightweight inline configurable rich-text editor for the web. Can fit where both FCKEditor and TinyMCE are too clunky and monstrous.

    Share This

    Posted in Links, Notepad, Software, Web | 1 Comment »

    Developing with Drupal: screencasts

    26th March 2008

    drupaldojo.com - at the moment of writing, has 42 video-lessons (screencasts) of developing with Drupal.

    Share This

    Posted in CMS, Drupal, Links, Notepad, Software, Web | No Comments »

    Good techie intro for would-be Drupal developers

    26th March 2008

    Drupal technical introduction
    It’s quite old, but as it describes core functionality, it should be still actual.

    Please comment if you know of any other good high-quality technical Drupal introductions/descriptions.

    Share This

    Posted in CMS, Drupal, Links, Notepad, Software, Web | No Comments »

    SystemRescueCD

    15th March 2008

    Earlier, I wrote about Universal boot CD , which is targeted primarily at the hardware testing/diagnosing.

    If not hardware, but “only” software is malfunctioning - try SystemRescueCD, a Linux-based recovery CD/DVD/Flash stick (it all depends on how you burn/install the downloaded file - manuals and how-to’s are available).

    As always, Disclaimer: I am in no way associated with SystemRescueCD, and gain no profit from this post. Any advice I give is provided AS IS, with no guarantees of fitness to your exact case.

    Share This

    Posted in *nix, Links, Notepad | 3 Comments »

    How to end (an official) letter

    15th March 2008

    Found useful list and discussion of the complimentary closings.

    It’s the “complimentary close” or “complimentary closing” that business writers are wondering about, those phrases that come before the signature in a letter:

    1. Very truly yours,
    2. Respectfully,
    3. Yours truly,
    4. Sincerely yours,
    5. Sincerely,
    6. Best regards,
    7. Regards,
    8. Cordially,
    9. With many thanks,
    10. Warm wishes,

    Share This

    Posted in Links, Notepad | No Comments »

    SQL injection: RIAA example

    16th February 2008

    I know it’s kind of old now, but check this image out:

    RIAA screenshot with some SQL injection code

    Via webplanet.ru - reddit.com.

    Share This

    Posted in Links, Notepad, Programming, Society, Web | No Comments »

    Convert MySQL database from one encoding/collation into another

    8th February 2008

    Most frequent use: convert database from latin1_swedish to utf8_general_ci.
    Original script found at: MySQL and UTF-8.

    Update: the original script had an error, it would generate queries likes this one (note the bold part):

    ALTER TABLE `links` CHANGE `link_rel` `link_rel` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT NULL;

    This is clearly wrong syntax (and logic). I fixed this by making comparison to NULL strict (with three equal signs instead of two):

    // Does the field default to null, a string, or nothing?
    if ($row['Default'] === NULL)

    Update 2: based on comment by banesto, I modified the script; now it does not require specifying the from_collation, it’s sufficient to specify to_collation (which will be used for all the fields and tables). The modified code is:

    if ($row['Collation'] == ” || $row['Collation'] == $convert_to)
    continue;

    Here’s the script itself: (to copy-paste: first click the “Plain text” header)
    Read the rest of this entry »

    Share This

    Posted in Links, Notepad, PHP, Programming, Web | 10 Comments »

    Ultimate boot CD - diagnostic, testing, and recovery utilities collection

    21st December 2007

    Today, using memtest86, system speed test, hddspeed and some other DOS utilities for diagnosing and testing PC hardware, I decided to put together my own simple bootable utility CD disk. But first, I did some searching to find if something similar exists.

    It does exist - Ultimate boot CD. That CD has numerous freeware testing and diagnosing utilities which will help you - if you are up to some good old (read “small fast”) DOS utilities. And not that old, actually - modern hardware is supported.

    The only modification I’ll do to the Ultimate boot CD will be adding freeware Biew bin/hex viewer/editor. Surely, more utils to come - with original size of just 115MB, there’s plenty of room to add extensions. You can even extend the CD image with non-free software, like Partition Magic.

    P.S. To diagnose and fix software problems - have a look at System Rescue CD.

    Share This

    Posted in Hardware, Links, Notepad, Software | 1 Comment »

    Windows XP Home Edition: gpedit.msc (group policy) editing via registry

    15th November 2007

    It’s actually possible to install gpedit.msc snap-in for MMC in Windows XP Home Edition. I found the list of necessary files on pagesperso-orange.fr (in French), which also had the archive of all necessary (again, French) files and the installation batch-file (download gpedit pour xp home.zip; copied from here, which was found using “gpedit pour xp home.zip” keywords).

    It’s easy to figure out what to do even if you do not understand French, but do know what gpedit.msc is for. However, here are some short instructions in English for manual MMC snap-in installation (batch file from the archive does everything automatically, but you’ll have to edit and verify the batch file first):

    • put these files:

      appmgmts.dll
      appmgr.dll
      fde.dll
      fdeploy.dll
      gpedit.msc
      gpedit.dll
      gptext.dll

      into %SystemRoot%\system32 folder (most often it’s just c:\windows\system32)

    • put these files:

      system.adm
      inetres.adm
      conf.adm

      into %SystemRoot%\system32\GroupPolicy\Adm\ (create if this folder doesn’t exist)

    • finally, run these commands one by one in the CMD window:

      regsvr32 gpedit.dll
      regsvr32 fde.dll
      regsvr32 gptext.dll
      regsvr32 appmgr.dll
      regsvr32 fdeploy.dll

    That should make gpedit.msc callable as Start -> Run -> gpedit.msc.

    Other language versions of the necessary files can be retrieved from corresponding-language installations of WinXP Professional; English version can also be downloaded from Microsoft ( e.g. here , or search for “Group Policy ADM Files” at microsoft.com). Also, you can extract necessary files from available Windows distributions: just don’t forget, that “filename.dl_” is a compressed version of “filename.dll”, and can be uncompressed by using XP-bundled extract command.

    Some additional information (geeks corner):

    1. a comprehensive list of the “Group Policy/User Configuration/Administrative Templates” settings in Windows XP Home Edition
    2. there’s also an extremely comprehensive Excel sheet, which maps numerous *.adm-file options to their registry equivalents - Group Policy Settings Reference (PolicySettings.xls). This file is for Windows 2000, Windows XP, and Windows 2003

    Disclaimer: I do not know if modifying (enhancing) your WinXP HE in such a way is a violation of any EULAs. It’s your own responsibility to check this out and comply with any such regulations. Also, be advised that modifying any settings using gpedit.msc on WinXP HE may render some parts of the OS inoperable (IMO).

    Share This

    Posted in Links, Notepad, Software | 20 Comments »

    DNS troubles?

    1st October 2007

    Today my blog’s domain bogdan.org.ua isn’t resolving to IP address from several worldwide locations. The trouble seems to be with XName, as running nslookup using ns?.xname.org gives me this:

    DNS server handling your query: ns1.xname.org
    DNS server’s address: 87.98.164.164#53

    ** server can’t find bogdan.org.ua: SERVFAIL

    It’s rather strange that all the other domains I have on XName are functioning properly.

    I can’t figure out the reason behind the problem; will keep trying to resolve as soon as possible.

    Update: this is in fact XName-related problem: they are again under DDoS attack.

    The other domains I have at XName might have stayed unaffected thanks to the secondary nameservers; it might have been just the question of the difference in sync times, that caused bogdan.org.ua to expire earlier than other domains.

    It’s a great pity that DDoS attack organizers cannot (yet) be reliably tracked and then punished. Attacking a free web service cannot be explained other than by mental sickness or noticeable loss of profit by some entities…

    Share This

    Posted in Notepad | 1 Comment »

    Useful Python looping techniques

    26th September 2007

    These are all excerpts from the Python documentation.

    To synchronously and simultaneously loop over two sequences:

    PYTHON:
    1. questions = ['name', 'quest', 'favourite colour']
    2. answers = ['Lancelot', 'the holy grail', 'blue']
    3.  
    4. for q, a in zip(questions, answers):
    5.     print 'What is your %s?  It is %s.' % (q, a)

    To loop over a sequence with both key and value:
    Read the rest of this entry »

    Share This

    Posted in Notepad, Programming, Python | No Comments »

    How to sort Python dict (dictionary)

    26th September 2007

    Sample script (copypasted from Well House Consultants training course):
    click the PLAIN TEXT header for copy-pasteable version

    PYTHON:
    1. #!/usr/local/bin/python
    2.  
    3. author = {"php":"Rasmus Lerdorf",\
    4.     "perl":"Larry Wall",\
    5.     "tcl":"John Ousterhout",\
    6.     "awk":"Brian Kernighan",\
    7.     "java":"James Gosling",\
    8.     "parrot":"Simon Cozens",\
    9.     "python":"Guido van Rossum"}
    10.  
    11. langs = author.keys()
    12. langs.sort()
    13.  
    14. for language in langs:
    15.     print language,"is the child of",author[language]

    You can also define the Python ksort() function similar to that found in PHP:
    Read the rest of this entry »

    Share This

    Posted in Notepad, Programming, Python | No Comments »

    PHP proxy

    19th September 2007

    PHP proxy is simple but good. I converted it into a proxy-function for one of my projects.

    Do pay attention to the comments, especially these two:

    I had issues with this script (and others) returning 0 for the bytesTotal in flash. Basically, the Content-Length header was absent from the response. By simply adding
    header("Content-length: ".strlen($response)) before the echo, it resolved the issue. I don't know if there is a more appropriate fix to account for character encoding, etc, but it seems to work.

    @Schimmi: Well, if you can add some checks there (like who is referring your script) and allow the access to whitelisted clients (served from your domain)... I think, you can totally make it used applications from same-domain....So it would not be open to world. Yeah above script doesn't have those things.

    Share This

    Posted in Links, Notepad, PHP, Programming | No Comments »

    Using Cytoscape from behind an HTTP proxy which requires authentication (authorization)

    14th September 2007

    Cytoscape 2.5.1 supports proxies, including HTTP proxies, but there is no support for HTTP proxies requiring authentication/authorization. It's easy to use Cytoscape in the authentication-requiring proxy scenario; below is one possible method.

    Note, that exactly the same method can be used to allow any software, which supports proxies but not proxies with authentication, to be able to access the internet.
    Read the rest of this entry »

    Share This

    Posted in Bioinformatics, Notepad, Science, Software | No Comments »

    MySQL - Python: good MySQLdb tutorial (examples)

    7th September 2007

    Andy Dustman gave a presentation on Python and MySQL at the MySQL Users Conference 2005, Santa Clara, CA. The presentation is an excellent collection of examples for those who use the MySQLdb Python module.
    Read the rest of this entry »

    Share This

    Posted in Links, Notepad, Programming, Python | 2 Comments »

     
    Close
    E-mail It