-
A very nice quote from Dune, written 60 years ago: [Read More]
-
GreyNoise IP check
GreyNoise is providing a nice check of your IP address. The idea is that if the IP you are using was caught mis-behaving - you will get that reported. Mis-behaving means that your IP was used to scan or attack other computers on the network. It may be an indicator... [Read More] -
Quantum Computing and Programming workshop QBronze160
Organized by organized by QPoland, Fundacja Quantum AI, and the AI Lab at AGH, 5 days long workshop. [Read More] -
Compile PHP 8.4 with xdebug from source on Ubuntu 22.04
It is easier than you think! Here is what I did on my Ubuntu 22.04 installation [Read More] -
Profitable AI course from openHPI
Nice course from openHPI by Elizabeth Press about AI profitability. [Read More] -
Notes from the book: Gamification For Product Excellence
Key concepts in gamification: Reward systems Progress tracking Narrative and storytelling Social engagement Game psychology [Read More] -
The Famous Computer Cafe show recovered and archived
“The Famous Computer Cafe” is a radio show from 1980s about the new thing - home computers. 53 episodes have been recovered and are now archived on archive.org. Included are interviews with people like Douglas Adams (The Hitchhiker’s Guide to the Galaxy), Bill Gates, Jack Tramiel (Atari) [Read More] -
Measuring Developer Goals - IEEE Article
List of a developer goals from IEEE article: Measuring Developer Goals. [Read More] -
Compile Ardour using Ubuntu 22.04
Install dependencies: [Read More] -
Compile Battle for Wesnoth 1.18 in Ubuntu 23.10
Enable src packages - edit /etc/apt/sources.list and un-comment lines starting with dev-src. [Read More] -
Python SDK to list Azure Samba File Shares
This blog describes how to use Azure libraries (SDK) for Python to list Samba File Shares and read files and folders on Samba File share on Azure. [Read More] -
Generative AI with Large Language Models - course
Very nice, short (you will do it in 1h) course by DeepLearning.AI & Sharon Zhou - How Diffusion Models Work. [Read More] -
Książka: Harvardzki podręcznik skutecznego uczenia się
-
Run LLM on your local machine
Thanks to Mozilla’s llamafile it is now super easy to run LLM locally. [Read More] -
Książka: AI w strategii - notatki
-
Generative AI with Large Language Models - course
Just finished nice course available on Coursera. The course is done by DeepLearning.AI & Amazon Web Services. It’s taught by AWS employees: Antje Barth, Shelbee Eigenbrode, Mike Chambers, Chris Fregly. [Read More] -
How to wait for process to finish in bash and check its exit code?
We want to run some process in the background and continue script execution. Then at some point we want to stop and wait for this process to finish. We also want to capture the exit code of this process. Once we have PID of the process we put in background,... [Read More] -
Do Foundation Model Providers Comply with the Draft EU AI Act?
Stanford’s researchers have done a great job evaluating some foundation models against their compliance with proposed EU law on AI. [Read More] -
Google paper that started it all - Attention Is All You Need
The paper that kick-started LLM development is from Google, published in June 2017. It introduced Transformer architecture and “self-attention” mechanism. -
TETRA TEA1 encryption degradation - possible backdoor in police radio
A serious weakness has been found in proprietary encryption cipher TETRA (TErrestrial Trunked RAdio) standard, that is used by police and other organizations. [Read More] -
How to find fonts that render glyph for given unicode character.
I want to find all fonts that support Polish accented characters (ąćęłńóśżź). [Read More] -
Migration from microservices to monolith architecture
An article on IEEE about project that decided to switch from microservice architecture to monolith. -
Limit process CPU use with cgroups version 1 and cgroup tools
#!/bin/bash sudo cgdelete cpu:/testgroup sudo cgcreate -g cpu:/testgroup [Read More] -
Book Linux Service Management Made Easy with systemd by Donald A. Tevault
-
Enforce memory limit in systemd service
Create new service with MemoryHigh and MemoryMax directives. $ systemctl edit --force --full memory.service [Read More] -
Enforce process limit in systemd service
Simplest possible service that runs /root/process.sh script: [Read More] -
IEEE article - Blockchain's Carbon and Environmental Footprints
An interesting article on IEEE about Blockchain’s Carbon and Environmental Footprints. [Read More] -
Book Keycloak - Identity and Access Management for Modern Applications by Stian Thorgersen and Pedro Igor Silva
-
How to configure OpenID Connect with github
The example below is based on Moodle but similar will apply to any open OpenID Connect (OIDC) Relying Party. Moodle URL used here as example is https://test.pycert.org. Replace it with your installation URL. [Read More] -
How to list all TCP/IP connections ordered by IP and count
How to list TCP/IP connections per remote IP, ordered by count: [Read More] -
Troubleshooting HTTPS with openssl
Display certificate information: [Read More] -
Book Solving Identity Management in Modern Applications by Yvonne Wilson and Abhishek Hingnikar
-
ranger file manager cheatsheet
Cheatsheet for ranger - a console file manager with VI key bindings, based on heroheman. [Read More] -
Book Security Engineering by Ross Anderson
-
Local development of LDAP authentication with Symfony 5.4 and Apache Directory Studio
Working on my local Ubuntu 20.04 installation, I will set up a development environment and implement Symfony authentication with LDAP. [Read More] -
OWASP Top 10:2021 PDF export dowload
OWASP Top 10:2021 is out there! [Read More] -
How to execute MySQL script with SQL line(s) injected into the session
I have a file sql.gz that is a big MySQL dump, so I do not want to extract it when importing. [Read More] -
Using atop to capture and review historical data
atop is an extremely useful top-like utility that shows the current state of the system. [Read More] -
How to set-up reliable autossh tunnel in Ubuntu
How to set-up reliable autossh tunnel in Ubuntu 20.10 [Read More] -
How to install Pi-hole on Raspberry Pi 4 with Ubuntu server
How to install Pi-hole on Raspberry Pi 4 with Ubuntu server [Read More] -
Using Pressure Stall Information (PSI) to find performance bottleneck
Using Pressure Stall Information (PSI) to find performance bottleneck [Read More] -
Moodle's performance information and events
Moodle’s performance information and events [Read More] -
Session locking in Moodle part 3
How does the session locks work in Moodle (part 3)? [Read More] -
Session locking in Moodle part 2
How does the session locks work in Moodle (part 2)? [Read More] -
Session locking in Moodle part 1
How does the session locks work in Moodle (part 1)? [Read More] -
How to change the time after which unused LXD images are deleted
How to change the time after which unused LXD images are deleted? [Read More] -
How to delete multiple remote git branches
How to delete several remote git branches? [Read More] -
Compile Battle for Wesnoth 1.14 using Ubuntu 19.04
Install dependencies: [Read More] -
Lines of code calculation in Moodle 2.6 - 3.4
How many lines of code does Moodle core have? [Read More] -
URL-dependent load balancing with HAProxy
The problem [Read More] -
systemd PrivateTmp with Apache on Ubuntu 17.04
Apache service on Ubuntu 17.04 is configured by systemd with PrivateTmp=true option. You can see it in: [Read More] -
Coding style convention for naming Moodle variables
There quite are few naming conventions for multiple-word variable names in use these days. The most popular are: [Read More] -
Editing big MySQL dump files
When mysqldump is created with –databases or –all-databases option, it will add “CREATE TABLE” and “USE” statements. If you need to restore the dump into different database (different name) you need to remove those statements. For small files it’s not a problem - just edit the dump with your favourite... [Read More] -
MySQL data diff using dumps
Sometimes we want to find out what has changed in the database when some application action was made. One very simple way to do that is to use MySQL data dump with “–skip-opt” option + diff. Of course if your database is very big, it may take a while. “–skip-opt”... [Read More] -
.htaccess behind a load balancer
.htaccess: [Read More] -
REST web services that authenticate against Alfresco with Spring Security and Apache CXF
Introduction Purpose of this blog is to show how to integrate Spring Security framework with REST web services implemented using Apache CXF. To authenticate user within Spring Security framework external authentication mechanism based on token is used. The idea is to authenticate Spring Security application against external application – in... [Read More] -
MySQL sync_binlog performance and reliability
Testing sync_binlog is a setting that (when set to 0) forces MySQL to flush a write to binary log to disk after every transaction. I have performed a quick test to see how does the setting affect the performance of MySQL and the reliability of the binary log. Test setup:... [Read More] -
Limit upload file size to Alfresco (repository)
Introduction This blog describes how to limit upload of files with size exceeding particular value to Alfresco repository. Implementation Restriction can be done in ContentServiceImpl class. Let’s extend this class in class CustomContentServiceImpl. We can add sizeLimit variable which is going to keep limit value in bytes and then use... [Read More] -
Workflow with periodical e-mail reminders in Alfresco
Introduction This blog introduces sending periodical e-mail reminders in Alfresco Activiti Workflows. Workflow with periodical e-mail reminders To send periodical e-mail reminders (as well as to do any other periodical action) we have to start from defining the workflow. Let’s assume that we extend already existing workflow ‘Review And Approve... [Read More] -
Number of lines of code in Moodle 2.6
How many lines of code does Moodle have? The short answer is: core Moodle 2.6 has about 600k lines of code + 3rd party libraries. Now, the long answer. A lot of the Moodle code are 3rd party libraries that are copied mostly under “lib” directory and some other places... [Read More] -
Access private properties of different object of the same class
Have a look at the following code: class A { private $var = 17; [Read More] -
Multi-valued search in Alfresco
Introduction The purpose of this blog is to show how to enable search for multi-valued properties in advanced search form in Alfresco. Let’s assume that we are looking for authors and we want to find all the documents created by author John or Mary. This feature allows to do this... [Read More] -
Send e-mail from a template in Alfresco
Introduction This blog describes how to create e-mail template in Alfresco and use it for sending e-mail. Template E-mail templates are kept in folder Company Home/Data Dictionary/Email Templates, but in general they can be kept in any folder. Let’s assume, that in our template we want to use some variables,... [Read More] -
Code generation feature in moosh 0.5
See the screencast below for the description of new moosh feature – code generation. You can download moosh from Moodle plugins, also see the documentation. Make it fullscreen to see the details! -
Automatic build and deployment on push with GIT, ANT, and Tomcat
Introduction Imagine that you have few developers working on Java project. Code of the project is committed to GIT repository and there are ANT scripts implemented to facilitate builds and deployments of the system as well as additional activities that might be useful. The developers using this infrastructure push code... [Read More] -
Brace expansion in bash and zsh
Bash and zsh both have a very neat feature for expanding a single word into more: brace expansion. For the simplest example, imagine you need to move file.old as file.new. Normally you type: [Read More] -
How to detect user’s home directory from PHP on Linux & Windows
I needed to locate current user’s home directory, to find and parse a config file like ~/config.ini. The current user is a user that is currently running a PHP CLI script. I have found a neat solution in drush, ready to copy & paste into your function: // getenv('HOME') isn't... [Read More] -
Redirect output of a script from the inside of it
Normally, when you want to redirect (standard) output of a script to a file, you run it with a redirection, like: $ ./script.sh > out.log However – you can also accomplish the same from inside the script by using exec. The following will write “Test” and then current time into... [Read More] -
Include additional local files from .zshrc
I try to keep the same .zshrc dotfile on all the machines I use. I store the “master” copy in SVN, so any improvements I make can easily go to other computers. However, some parts of zshrc configuration only make sense for particular machine. To keep one common master copy... [Read More] -
Extract the content from the documents and make it searchable with solr 4
solr can be easily extended to handle binary files and extract the information from them. Apache Tika library is used for the file analysis. [Read More] -
Accented characters in Alfresco (MySQL database)
I had a problem when I created document/folder name in Alfresco Share that included Polish characters, e.g., ą, ę, ł, ż, ź. The Polish characters at first were rendered correctly but in the database (MySQL) they were saved wrong, which means that ? character was put instead of Polish letters.... [Read More] -
How to setup solr 4 on tomcat in Ubuntu server 12.04 LTS
Update on 2012.09.20: updated for Solr 4.0-BETA (from ALPHA, thanks for the comment Dorthe). Update on 2013.07.09: updated for Solr 4.3.1 Update on 2013.07.28: the guide works with Solr 4.4, Ubuntu server 13.04 and tomcat7, just replace tomcat6 with tomcat7 and /var/lib/tomcat6/shared with /var/lib/tomcat7/lib This short guide will describe how... [Read More] -
Debugging JavaScript in Alfresco and Alfresco Share
Introduction This post describes how to debug JavaScript in Alfresco/Share. There are two types of js files used in Alfresco/Share: client side – they are placed in Share root directory server side – they are placed in the path within WEB-INF/alfresco directory in Share and Alfresco and are used for... [Read More] -
Manually authenticate Symfony 2 user
Normally authentication is handled by Symfony nearly automatically – you just need to define and configure your firewalls. Sometimes, however you may want to perform authentication manually from the controller. Imagine implementing automated login for a user upon visiting a URL like: /autologin/{secret}. I am not considering here the security... [Read More] -
Alfresco workflow – copy files attached to a folder
Introduction The purpose of this post is to present creation of new workflow that would copy attached file to selected location depending whether the document was approved or rejected. In addition, I explain in more detail wokflow console and show how to gather more information regarding workflows from it. Creation... [Read More] -
Tomcat environment variables and run
Introduction This article describes few useful bits and pieces about running Apache Tomcat. Setup of Tomcat environment variables – setenv.sh As stated in CATALINA_BASE/bin/catalina.sh file the following environment variables can be set in CATALINA_BASE/bin/setenv.sh . setenv.sh script is run on Tomcat startup. It is not present in standard Tomcat distribution,... [Read More] -
Limit bandwidth for a service
To test a performance of multiple parallel file downloads, I had to make sure that a download takes significant amount of time. I could use huge files but that’s not very helpful if you work on a local, 1Gb LAN. So I’ve decided to limit download speeds from my Apache... [Read More] -
Basic python script for Gimp
Some time ago I had to porcess a lot of images in a simple way – remove the top and bottom part of them. It was not a task I could automate – the amount of image I had to cut from the top & bottom varied for each photo.... [Read More] -
Monitoring of Tomcat with VisualVM and VisualGC
Introduction Sometimes it can be useful to monitor performance of Java Virtual Machine (VM) on remote host. To do so, a very nice tool – VisualVM – can be used. It can be run on local host and get information from jstatd running on a remote host. In addition, VisualVM... [Read More] -
git server with apache authentication on Ubuntu Debian
Introduction This guide will describe how to serve git repository on HTTP port using Apache. This should work on any recent Ubuntu or Debian release, I’ve tested it on Ubuntu Server 11.10. I’m setting it up on my local server 192.168.1.20 under git/agilesparkle, so my repository will be available at... [Read More] -
Print default Java performance options
Unless provided explicitly, Java VM will set up several performance-related options depending on current environment. This mechanism is called ergonomics. You can see what defaults would be used on the machine by invoking: [Read More] -
Moodle Global Search and Zend Lucene performance
Introduction I’ve been working for some time on rewriting Global Search feature for Moodle. This is basically a search functionality that would span different regions of Moodle. Ideally it should allow to search everywhere within Moodle: forums, physical documents attached as resources, etc. The implementation should work in PHP, so... [Read More] -
Creation of workflow in Alfresco using Activiti step by step
Introduction [Read More] -
Change the location of zim notebooks
Zim is a desktop wiki I highly recommend. Recently I’ve switched to another desktop and after copying my whole home directory, zim default notebooks did not open anymore. This was because I’ve changed my username, which has caused a change in the location of my zim notebooks. This can be... [Read More] -
Install soapUI on Ubuntu 11.10
Introduction This post describes how to install soapUI on Ubuntu 11.10 and solve potential issues with installation. Installation Download linux version (soapui-4.0.1-linux-bin.zip file) of soapUI 4.0.1 Unpack it to desired location Add execute permission to bin/soapui.sh file: chmod +x bin/soapui.sh Run soapUI ./soapui.sh Troubleshooting If you get following exception after... [Read More] -
Alfresco development environment with Tomcat and Eclipse
Introduction This post describes how to set up environment to be able to code and debug Alfresco on Tomcat in Eclipse. To start with make sure you have downloaded and installed the following: Eclipse Indigo – download it here Tomcat 7.0 – download it here Sysdeo Eclipse Tomcat Launcher plugin... [Read More] -
Make star (*) to match hidden (dot) files
To make star character in bash to match hidden files, use dotglob option: [Read More] -
Show full path to the current file in vim
I find this one very useful, when you press just CTRL-G in vim you will get some basic file information: [Read More] -
xargs, find and escaping pipe and semicolon
I wanted to iterate over set of directories and calculate total number of files inside each of them (recursively). xargs & find would do it just fine but you can not easily escape pipe inside xargs command. Here is the solution: [Read More] -
Send email from command line without x-mailer tag
I usually set my postfix to relay via gmail SMTP to allow me for reliable external email delivery from my gmail address, with the convenience of the command-line. To send an email using mail utility I can simply use: [Read More] -
ext2 ext3 partition block group error
Here is the error from dmesg I’ve got when trying to mount external HDD: [Read More] -
Recursively find the latest updated file
Here is the command: find . -type f -printf '%TY-%Tm-%Td %TT %p\n' | sort -r | head -
Automatically equalize brightness of several images
Introduction I have a collection of 160 photos that I would like to montage into a movie. Each photo was done on a different day and the brightness of each photo varies. This will definitely not look good on the photo, so I’ve decided to “normalize” the brightness across the... [Read More] -
How to find the widest image
Recently I had to locate the widest image in the set of photos in a directory. Here is how you can easily do it with identify command, from ImageMagick suit: [Read More] -
Resize images in bulk to the same width or height, same aspect
mogrify is the tool you are looking for – it comes with the great imagemagick package and it’s designed especially to be used for bulk operations. To resize all images in current directory to 600 pixels wide (width): [Read More] -
Bulk rename photos to date
I have a collection of related photos stored on my PC. The filenames were “ugly” – standard file names coming from the photo camera. I would like to rename them into a file containing the date when the photo was shoot, e.g. 2011.07.21.jpg. There is an excellent commandline tool to... [Read More] -
Create ant task for Hibernate tools
Introduction In this blog we’ll be looking at how to use hibernate tools with just ant. This may be useful if you need to plug some hibernate tasks into your build system or have them scripted in any way. We will create a stand-alone ant build file with the minimum... [Read More] -
Remember me in Spring Security 3
Introduction Remember me functionality is a mechanism that lets users log in automatically, even when they re-start their browser. In other words: after their session cookie is deleted by the browser (which is normally after closing the browser). This is implemented by setting up another cookie that will live in... [Read More] -
Remote debugging of web application deployed on Tomcat server or using Jetty Maven plugin with Eclipse
Sometimes it might be very convenient to be able to debug application deployed on web server. This tutorial presents how to do it, if the application is deployed using Jetty plugin for Maven or Tomcat servers. Jetty Maven plugin Set the following MAVEN_OPTS to the following: [Read More] -
Spring Security 3 – basic integration and access decision manager
Introduction In the tutorial below we will look at a basic integration of a Java web application with Spring Security 3. In this particular scenario we’ll be integrating Spring Security with existing web application that uses Struts & Spring. However, similar steps can be applied to any other web framework... [Read More] -
Development environment setup for Eclipse, Maven, Spring 3, Struts 2, Hibernate and Jetty
Introduction When developing web application set up of convenient development environment might be crucial for more efficient work. Let’s consider web application that uses following frameworks: Maven Spring Struts2 Hibernate In addition we want to use Eclipse as our editor. This tutorial presents initial setting of Eclipse project to support... [Read More] -
Recursively find total size of selected files-directories
Sometimes simply checking the size of the whole directory is not enough, and you need more information, e.g. the whole directory has 3GB – but how much of it are those .avi files inside? The most flexible way for matching the files (or directories) is by using find command, so... [Read More] -
Enhancing Drupal performance with drupal_static
One of the easiest methods of optimizing the execution of PHP script is by using a static variable. Imagine a function that does some complex calculations, possibly executes several database queries. If the return value from the function does not change too often and the function may be called several... [Read More] -
Using Apache log4j to log Apache CXF web service messages
Apache log4j is one of the most popular frameworks used for logging events within Java code. Apache CXF on the other hand is one of the most popular framework to support communication using web services. To monitor and debug Java application there might be a need to log inbound and... [Read More] -
Get next auto_increment value in MySQL
I was recently working on some MySQL 5.5 performance testing. I had to generate a lot of SQL queries I would then use for my testing. To make my tests repeatable I needed to hardcode the values for IDs. That is, I couldn’t simply use: INSERT INTO TABLE_NAME SET column1... [Read More] -
Symfony 2 Dependency Injection as a standalone component
Setup Below I will demonstrate how to use an excellent Dependency Injection component from Symfony 2, without using the whole Symfony framework. I will also use ClassLoader from Symfony and just for the sake of the demo I will integrate it with Zend Framework. The code requires PHP 5.3 (mostly... [Read More] -
Spring, Hibernate, Maven, and Struts2 integration tutorial – part 5 – Hibernate update
This is part 5 of the Java Technologies Integration tutorial. The purpose of this part is to provide updates to Hibernate configuration in existing project to make the maintenance of the project more straight forward. [Read More] -
Compile Battle of Wesnoth 1.9 in Ubuntu 11.04
Below is the fastest way to install the latest trunk version (currently 1.9.6) of Battle of Wesnoth on your Ubuntu Natty Narwhal. Note: it will probably install a bit too many packages than you really need. [Read More] -
Master slave replication in MySQL 5.5
I’d like to share a quick guide on how to set up master/slave replication for the MySQL 5.5 server. The procedure below should be used for development/testing only. If you want to create a production-ready setup, you should follow instructions from MySQL official documentation or use MySQL server packaged by... [Read More] -
Disable “published by” heading from teaser
I wanted to change the way teasers are displayed – disable this information about the node submission: published by admin on Fri, 04/22/2011 – 17:25. [Read More] -
Transfer-only-selected-file-types-with-rsync
Say you would like to transfer set of files from location A to B. The source directory is really big but you are only interested in transferring some files (say *.png only). rsync is a good tool for the job. There are two methods I know that can be utilized.... [Read More] -
utf-8 with perl odbc, freetds, and ms sql server
to make perl properly handle utf-8 strings inserted and retrieved from ms sql database, freetds config must be used (the configuration with only odbc.ini is possible to make perl connect to a database, but i could not find any way to make it work with utf) for this purpose, the... [Read More] -
WYSIWYG module, loads of checkboxes, problem and solution
Update 2013.06.17: use Multiple Checkbox Checker. Update 2012.12.10: also try CheckFox extension. Update on 2011.12.01: the script doesn’t work for my FF8 anymore, looks like checkboxmate-lefedor-edition is a way to go now. [Read More] -
Quit less without cleaning the screen
Normally when you quit less, your screen will be redrawn and you will be back with the content you could see on your screen before using less. Sometimes though it’s very handy to see the file with less, scroll down to the fragment of your interest and have that fragment... [Read More] -
Spring 3 transactions with Hibernate and AOP, without HibernateTemplate
In the tutorial below I will focus on transactions management with Spring 3. For the sake of simplicity, we will create a standalone Java application – but the same logic can be used in J2EE application. We will create: Entity objects (simple POJO) – the basic entities mapped to the... [Read More] -
Simple AOP tutorial with Spring 3
Simple Spring In this tutorial we will create, from the very beginning, a simple application that uses Spring and its Aspect Oriented Programming capabilities. We will use schema-based approach from Spring 2.0 to define the AOP configuration. I am not going to cover here the AOP or Spring basis, if... [Read More] -
Spring, Hibernate, Maven, and Struts2 integration tutorial – part 4
This is part 4 of the Java Technologies Integration tutorial [Read More] -
Spring, Hibernate, Maven, and Struts2 integration tutorial – part 3
This is part 3 of the Java Technologies Integration tutorial. [Read More] -
Spring, Hibernate, Maven, and Struts2 integration tutorial – part 2
This is part 2 of the Java Technologies Integration tutorial. [Read More] -
Spring, Hibernate, Maven, and Struts2 integration tutorial – part 1
Introduction The purpose of this tutorial is to demonstrate the technical solution for integration of 4 leading frameworks: Maven Spring Hibernate Struts2 Such a combination allow the development of you web applications with maximal of flexibility and minimal effort. In addition, the integration with SVN will be also demonstrated to... [Read More] -
dfsg string in a package name explained
Sometimes Debian and Ubuntu packages have “dfsg” bit in their package name. Out of 40175 packages in Debian unstable, 2015 of them contain string “dfsg”. The abbreviation stands for The Debian Free Software Guidelines which is a document that defines what kind of software is free (according to Debian Project).... [Read More] -
scubed howto
0. http://cube.dyndns.org/~rsnel/scubed/ (scubed_http) 1. svn checkout http://cube.dyndns.org/svn/scubed/trunk scubed; # get scubed 2. make, su, make install, scubed -V 3. there’s a README file, in the scubed/ directory and on the web-site. basically all is written there (scubed_readme) 4. it will be a file used, for demonstration purpose. but a real... [Read More] -
Execute a command with a timeout
Sometimes you need to stop a command, if it executes for too long. It’s very simple with a timeout utility from coreutils package. timeout is available in coreutils 8.X – recent enough version is currently in Debian squeeze and sid only. The version in Ubuntu 10.04 is too old (does... [Read More] -
The power of imagemagick
There is probably no need for me to introduce a great library for processing images: imagemagick. In this mini how-to I will show how I’ve used imagemagick to build an image from few different pieces of media (images and text). Problem [Read More] -
How to create a simple screensaver for gnome-screensaver
As a astronomy enthusiast, I really like the default screensaver that comes with gnome-screensaver, named “cosmos”. It’s nice but not ideal: [Read More] -
Easy password-less SSH login
Generate your SSH key. Leave passphrase empty (simply press enter): ssh-keygen [Read More] -
Low contrast in Open Office calc/writer selections
With my new Ubuntu 10.04 came new version of Open Office. One annoyance that has bothered me was too bright and not very visible selection area in OO calc (and writer as well). On my monitor the selection is barely visible and doesn’t contrast with the background: [Read More] -
cached plan must not change result type
An interesting error that may happen in PostgreSQL when using prepared statements is: ERROR: cached plan must not change result type This may happen when: A prepared statement is prepared on the server The tables structure is changed in a way that the result of the prepared statement will change... [Read More] -
How to display all MySQL queries your application generates
Sometimes it’s a good idea to intercept the SQL queries exactly as they are generated by your Java application. One way to do it (in MySQL) is to enable general_log. Another really handy option is to use MySQL JDBC driver option: autoGenerateTestcaseScript. It will dump all the queries to standard... [Read More] -
Using-shared-memory-in-PHP
PHP provides a handy support for System V IPC functions in the Semaphore module. Let’s have a look at the functions responsible for handling shared memory. They can be used to implement a simple way of exchanging information between the processes. To see if your PHP installation supports IPC, run:... [Read More] -
Parallel downloads with wget
How to download a list of URLs using more than one process (say wget) at the time? First, create a file with URLs – one URL per line. Let’s call the file url.txt. Then we need to create N wget processes, each downloading one URL at the time. Thanks to... [Read More] -
Non-database field in custom Drupal views 2
Drupal views 2 API allows creating views based on any table. Most of the fields you will be displaying will be based on the table columns but it may sometimes be handy to create a non-database field. Usually it will be a field that you need to compute – maybe... [Read More] -
Upgrade all packages but one
To upgrade nearly all packages with apt-get but “hold” some of them at the current version, you can use dpkg. Let’s say I would like to upgrade my Debian or Ubuntu system with apt-get and here is what I’m getting: % sudo apt-get upgrade [Read More] -
How to block HTTP requests for specific method
I needed to set my Apache Web Server to ignore/block all the HEAD requests but respond to GET requests normally. It is very simple with the mod_rewrite, for instance this can be added to .htaccess: [Read More] -
Dynamic MMap ran out of room
Increase the maximum allocated memory in your /etc/apt/apt.conf. Add this line if it does not exist (also create /etc/apt/apt.conf if necessary): [Read More] -
Howto mount ISO image in linux
Log in as root Create the directory for content: mkdir /mnt/iso [Read More] -
Convert and extract ISO, DAA and BIN image formats in Linux
One way to do it (I think it’s the only way for DAA proprietary file format) is to use Linux version of PowerISO. Get it from their website: wget http://poweriso.com/poweriso.tar.gz [Read More] -
ipp2p and connlimit kernel patches for 2.6.17
1) download a recent patch-o-matic 2) run `./runme –download`. you are to have curl to successfully download patches, so if you do not, install it 3) run `./runme external` and apply patches 4) configure, make, install your kernel 5) make and install your iptables if you need ipt_account, you can... [Read More] -
fast reboot with kexec
(bios) stage and that bootloader stage when we have a nice lilo/grub prompt. to enable it in kernel, say “yes” in Processor type and features->kexec system call (EXPERIMENTAL) make and install your kernel. we will need also a userspace tool called kexec. at the moment of writing, it is not... [Read More] -
usb mass storage howto
enable following options in the kernel: Device Drivers -> SCSI device support: -> SCSI device support -> legacy /proc/scsi/ support -> SCSI disk support -> SCSI generic support -> [SCSI logging facility] Device Drivers -> USB Support: -> Support for Host-side USB -> USB device filesystem -> USB drives. it... [Read More] -
KDE keyboard shortcuts
F1 Open KDE Help Center. Shift-F1 What’s this help. Alt-F1 Open the Applicantions Menu (K-Menu). Alt-F2 Display the Run Application dialog. Alt-F3 Open window menu. Alt-F4 Close window. WindowsContextMenuKey Popup context menu. Ctrl-Esc List of running applications (process table). Alt-Tab Switch to the next window. Alt-Shift-Tab Switch to the previous... [Read More]