:) bikulov.ORG Static notes about information technologies

CudaSafeCall application snippet

It is a good tone to check CUDA API errors while calling cudaMalloc() and other functions. It also helps to find floating bugs caused by hardware (lack of memory, etc). I provide below an adapted version of CudaSafeCall I found many weeks ago in the Internet. Simply remove #define CUDA_ERROR_CHECK in production if unneeded.

Enable tun for OpenVZ Ubuntu 12.04 containers in CentOS 6.4

To enable tun device in OpenVZ containers tun module

  • needs to be loaded in the host system (in my case CentOS 6.4)
  • containter (in my case Ubuntu Server 12.04) must be allowed to use tun

Configuring Ubuntu 12.04 in OpenVZ on CentOS 6.4

This howto is based on two sources: Official wiki and Amutu blog entry. In short, the main difficulty is in bridge network configuration: correct network configuration doesn’t work in CentOS 6.4 while NetworkManager is running. I compiled official documentation and fix found in Amutu blog here in one entry.

Creating Zip With VPN Client Keys and Configuration Files

Depends on server configuration, each OpenVPN client needs configuration file (client.conf for *nix and client.ovpn for windows), certificate authority (ca.crt), [optional] tls auth file (ta.key), user crt and key.

Configuration of hosts for convenient ssh connections

It is possible to save configuration of ssh connection for later usage. For example, one had to type

ssh <username>@<ip address> -p <port> -i <path to key file>

every time one wants to connect to server.

Ubuntu Server 12.04 + Slurm 2.5.7 fatnodes

SLURM (Simple Linux Utility for Resource Management) — job scheduler and resource manager usually installed on supercomputers. For example, it runs on Lomonosov supercomputer in MSU, Moscow, Russia.

Ubuntu Server 12.04 + Drupal 7 + nginx + MySQL

Default Drupal package in Ubuntu installs Apache, but I prefer nginx as a webserver. In this note I’ll describe steps necessary to get Drupal 7 work.

Universal screen capturing with scrot, imagemagick and ffmpeg

You can record your screen using only command line in Linux. Workflow will look like: Create a bunch of screenshots -> Crop screenshots -> Make a movie from images.

Get rid of Desktop window while launching Nautilus in i3

In i3 window manager by default Nautilus actually opens two windows: Desktop window and Nautilus itself. The former can’t be closed by the default shortcut $Mod+Shift+Q.

Tools for tracing a pcap file in linux bash

Pcap files are pocket capture files. They usually contain raw log of network connections and packets. It is the most popular format and it available in almost all network analysis tool.