Short IT recipes

i.e. some stuff and junk about Python, Perl, Matlab, Ruby, Mac X, Linux, Solaris, ...

Wednesday, October 22, 2008

Matlab: passing Cell into ansi C mex file

›
Let the test cell defined in matlab be test_cell={1,[2,3],[5,6,7;8,9,10;11,12,13]}; To get these values in mex C file we can write in functi...
Monday, September 22, 2008

sed: substitute text examples

›
En example Substitute text1 with text2 in file /etc/apt/sources.list: cat /etc/apt/sources.list | sed 's/text1/text2/g' > out.tx...
Sunday, August 24, 2008

VirtualBox: backup VDI using clonevdi tool

›
To list virtual drives: VBoxManage list hdds You must get UUID of virtual drive you want to clone. As an egzamples lets assume that UUID is ...
Tuesday, August 12, 2008

ubuntu-server: How to enabling public_html folder

›
To enable public_html folder in users home directory use the following: sudo a2enmod userdir
Saturday, June 21, 2008

Python: Isotropic fractal surface generator

›
#! /usr/bin/env python from __future__ import division import Image from scipy import * class FractalSurface(object): '''Gene...
Tuesday, June 03, 2008

ubuntu: iptables port redirect

›
I want to redirect all incoming requests on port 80 to 8080. I did it using the following command: sudo iptables -A PREROUTING -t nat -i eth...
Thursday, April 10, 2008

bash: simple loop through files

›
for f in *.tiff ; do echo $f; done Example with ImageMagick's convert program: for f in *.tiff; do convert -crop 384x384+48+35 $f out/...
Wednesday, April 02, 2008

R: clear workspace in R

›
rm(list=ls())
Wednesday, March 26, 2008

Two buttons and scroll in mouse in mac os 8.6

›
Please install this soft: GameSprockets_1.7.5.smi.bin usb-overdrive-14.hqx Mac_OS_ROM_Update_1.0.smi.bin Of course StuffIt Expander is requr...
Sunday, March 09, 2008

Python: script for sending email

›
Function for sending emails using Python script. It requires local SMTP server (e.g. Postfix) or one can provide address to the external SMT...
‹
›
Home
View web version
Powered by Blogger.