Recent Posts
Autarchy of the Private Cave
Return To Blog Listing
This is a personal blog used to make notes on what I am doing. What I do, usually concerns or is related to science (bioinformatics), society (general issues), some bits of programming (PHP), etc.
Recent Posts Tagged With programming
-
R script to filter probesets with log-expression values below the lowest spike-in
Sometimes there is a need to remove all the probesets, which have expression values below the minimal spike-in intensity on the Affymetrix microarray. The reasoning behind this procedure is simple: minimal-expression spike-ins represent the bottom ma...
-
Cloud-based bruteforcing, slowloris, and Golang: links
A nice report on the cost of bruteforcing variable-length and variable-complexity passwords using cloud computing services (e.g. Amazon’s EC). There’s a kind of a tutorial in their previous post. Slow DoS attack with just 1 computer again...
-
Configuring web-server: for production and for development
Production: see http://www.howtoforge.com/how-to-set-up-apache2-with-mod_fcgid-and-php5-on-debian-etch – it is for Debian Etch (which is old-stable), but many of the steps apply equally well to Debian Lenny (current-stable). Also, this is a ver...
-
Convenient design and debugging of regular expressions under Linux
Regular expressions (regexps) are powerful indeed. But debugging non-trivial regexps is a burden even if you understand how regexps work, and remember most (if not all) regexp syntax. Miscellaneous tools exist to ease this task. This post was inspire...
-
Bad memory handling and server stability
The two graphs below (clickable) are for CPU and RAM use during a period of a program going wild between 23:17 and 23:41 (24+ minutes of server’s downtime). The program was run non-root, it just consumed all the memory it could. It was killed b...
-
C: how to specify comparison operators floating precision
There is no way I'm aware of to do what the title says. However... I'm sure that you are aware of the fact that floats representation in any programming language is limited by the precision of the internal binary representations. In other words, you ...
-
Debugging PHP: Eclipse PDT + XDebug + XDebug helper
Stimulated by a bug in a complex and unfamiliar web PHP application with heaps of custom tweaks by other programmers, I decided to try a more professional approach to PHP programming and debugging than the standard var_dump() and family. As a result,...
-
GNU make for bioinformatics presentation
Giovanni Dall’olio has recently posted a presentation on using make. Although it has “bioinformatics” on the title page, this is a good and very easy to understand make intro. Original post is here....
-
Ada GNAT GPL 2009 released
We are pleased to announce the release of GNAT GPL 2009, the Ada Toolset for Academic users and FLOSS developers. It introduces many new features including: - Ability to generate byte code for the JVM - Improved support for the .NET Framework - Addit...
-
WordPress and Google Analytics external nofollow problem in comment links
Since some WP release, the comment author's link in comments is broken - it has ' external nofollow' attached straight to the href attribute (which breaks the link). I assume that the problem is caused by Google Analytics, namely the "track outgoing ...
-
Git: how to remove file and commit from history
Once I accidentally added circa 300 MiB of archive files to one of my git repositories (which was as small as 5 MiB). I removed those files as soon as I noticed them, but the .git directory still preserved commits with those files, and still occupied...
-
ExpressionEngine contact form (email module) spam vulnerability
Yesterday I had a look at mod.email.php - the Email module of ExpressionEngine CMS. It appears that it is very easy to use ExpressionEngine’s contact form (which uses Email module) to send emails to arbitrary addresses - simply put, send spam u...
-
Software development schedules
Joel Spolsky has an interesting (and useful) post on evidence-based scheduling, as he calls that approach. The post discusses an approach to estimate project volume and key dates (such as milestones and release) based on prior performance of each of ...
-
GNAT GPL 2008 is now available
We are pleased to announce the release of GNAT GPL 2008, the Ada Toolset for Academic users and FLOSS developers. It introduces hundreds of enhancements including: Availability on the Windows .NET platform Upgrade of the debugging engine Improvement...
-
Developing reluctant (pessimal) algorithms
If you had some programming experience - read it here. Otherwise ignore, it’s targeted for a narrow group....
-
Instructions on installing libmp3lame-enabled ffmpeg on shared linux hosting
Note: this post is based on the comment by Simon, who generously shared his experience. Step-by-step: Download the compiled ffmpeg with libmp3lame support (direct download links: older version ffmpeg.with.lame and newer version ffmpeg.2007-10-28.wit...
-
How to improve MySQL application perfromance
Juicy presentation, even for seasoned MySQL developers. | View | Upload your own You can also download the PDF of this presentation:...
-
SQL injection: RIAA example
I know it’s kind of old now, but check this image out: Via webplanet.ru - reddit.com. Share This...
-
Python: passing by value vs passing by reference
Note: this a collection of scraps, describing how values (de)referencing works in Python, and describing when your variable is either a value or a reference. Primary source of knowledge for this post (also here). Python passes references-to-objects b...
-
Convert MySQL database from one encoding/collation into another
Most frequent use: convert database from latin1_swedish to utf8_general_ci. Script copy-pasted from: MySQL and UTF-8. Here’s the script itself: (to copy-paste: first click the “Plain text” header; in FF2, RightClick->”Select a...
-
CodeCodex: shared online code repository
CodeCodex Wiki. Found this one useful when looking for string conversion to uppercase - CodeCodex has it for 10 languages (alas, Ada isn’t among them - but it’s present in tiny pieces here and there, when searching for it at CodeCodex)....
-
MySQL: INSERT IF NOT EXISTS syntax
To start: as of the latest MySQL, syntax presented in the title is not possible. But there are several very easy ways to accomplish what is expected using existing functionality. There are two possible solutions: using INSERT IGNORE or REPLACE. Imagi...
-
GoDaddy: undocumented 20-second CPU time limit on all executables? (python, ELF, etc)
Today, setting up a relatively serious (in CPU resources needed) web-system, I ran into a weird problem of python scripts ending prematurely. After some investigation, it looked like any process which uses up more than 20 seconds of CPU time, is auto...
-
Flash countdown video tutorial
Found a good video tutorial on how to create a countdown animation with Flash. Important notice: in my case, if Auto kern was enabled for the dynamic text box, there were no digits visible at all (size of my countdown animation was 120px wide and 186...
-
Useful Python looping techniques
These are all excerpts from the Python documentation. To synchronously and simultaneously loop over two sequences: PLAIN TEXT PYTHON: questions = ['name', 'quest', 'favourite colour'] answers = ['Lancelot', 'the holy grail', 'blue'&...
-
How to sort Python dict (dictionary)
Sample script (copypasted from Well House Consultants training course): click the PLAIN TEXT header for copy-pasteable version PLAIN TEXT PYTHON: #!/usr/local/bin/python author = {"php":"Rasmus Lerdorf",\ "perl":"L...
-
PHP proxy
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 Con...
-
MySQL - Python: good MySQLdb tutorial (examples)
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. For the purpose of maintaining a personal...
-
Date and time in Python scripts
Here’s an excellent description of various methods to handle date and time in Python scripts....
-
Elegantly converting Python list into another list with changed items
I just had a small problem with my Python script: 1. I have a list of tuples, called records_cache; each tuple looks like this: (note: for copy-pasting, click the PLAIN TEXT box headers) PLAIN TEXT PYTHON: (ensembl_transcript_id, ensembl_gene...
