Thursday, January 03, 2013

Smallest linux (1.44mb)

Visopsys - visual operating system

available in 1.44mb, USB, ISO and vmware image
http://visopsys.org/index.php

here's a screenshot



Boot-time splash screen

Greeting at first boot

Normal login screen

Default desktop

The Computer browser
and File Browser
programs

Viewing a JPEG image
 from the File Browser
 program

A command window,
the Programs folder, and
the Calendar, Edit,
Mines!,  and Snake!
programs running

A file selection dialog,
 the Administration folder,
 and the Devices and Disk
Manager programs
running

The Administration folder,
and the Configuration
Editor, Display Settings,
and Keyboard Mapping
programs running

Hoops background

Japan background

Saturn background




Tuesday, November 27, 2012

chrooted ftp on ubuntu 12.04 using vsftp


For those of you running Ubuntu 12.04, I have created a vsftpd 2.3.5 PPA that backports the allow_writeable_chroot config option from vsftpd 3 to the existing Ubuntu package. To use it:
sudo add-apt-repository ppa:thefrontiergroup/vsftpd
sudo apt-get update
sudo apt-get install vsftpd

ref: http://www.benscobie.com/fixing-500-oops-vsftpd-refusing-to-run-with-writable-root-inside-chroot/
1. add allow_writeable_chroot=YES
2. chroot_local_user=YES

Wednesday, November 21, 2012

regular expression (REGEX)

ref: http://www.w3schools.com/jsref/jsref_obj_regexp.asp

i found javascript regex book maybe usefull for php.


Modifiers

Modifiers are used to perform case-insensitive and global searches:
ModifierDescription
iPerform case-insensitive matching
gPerform a global match (find all matches rather than stopping after the first match)
mPerform multiline matching

Brackets

Brackets are used to find a range of characters:
ExpressionDescription
[abc]Find any character between the brackets
[^abc]Find any character not between the brackets
[0-9]Find any digit from 0 to 9
[A-Z]Find any character from uppercase A to uppercase Z
[a-z]Find any character from lowercase a to lowercase z
[A-z]Find any character from uppercase A to lowercase z
[adgk]Find any character in the given set
[^adgk]Find any character outside the given set
(red|blue|green)Find any of the alternatives specified

Metacharacters

Metacharacters are characters with a special meaning:
MetacharacterDescription
.Find a single character, except newline or line terminator
\wFind a word character
\WFind a non-word character
\dFind a digit
\DFind a non-digit character
\sFind a whitespace character
\SFind a non-whitespace character
\bFind a match at the beginning/end of a word
\BFind a match not at the beginning/end of a word
\0Find a NUL character
\nFind a new line character
\fFind a form feed character
\rFind a carriage return character
\tFind a tab character
\vFind a vertical tab character
\xxxFind the character specified by an octal number xxx
\xddFind the character specified by a hexadecimal number dd
\uxxxxFind the Unicode character specified by a hexadecimal number xxxx

Quantifiers

QuantifierDescription
n+Matches any string that contains at least one n
n*Matches any string that contains zero or more occurrences of n
n?Matches any string that contains zero or one occurrences of n
n{X}Matches any string that contains a sequence of X n's
n{X,Y}Matches any string that contains a sequence of X to Y n's
n{X,}Matches any string that contains a sequence of at least X n's
n$Matches any string with n at the end of it
^nMatches any string with n at the beginning of it
?=nMatches any string that is followed by a specific string n
?!nMatches any string that is not followed by a specific string n

Sunday, October 21, 2012

Linux dd do everything

http://www.linuxquestions.org/linux/answers/Applications_GUI_Multimedia/How_To_Do_Eveything_With_DD

Rescue an unreadable floppy.

ddrescue if=/dev/fd0 of=/home/sam/rescue.image bs=1440k conv=notrunc,noerror

with a new floppy in the drive

dd if=/home/sam/rescue.image of=/dev/fd0 bs=512 skip=2 seek=2 conv=notrunc,noerror

Now the new floppy should be readable

This method works similarly well with damaged CD's and DVD's. However, you must mount the resulting .iso image as a loop device and copy all the data that way.

ddrescue if=/dev/sr0 of=/home/sam/rescue.iso bs=2048 conv=notrunc,noerror

Make the following line in /etc/fstab.

/home/sam/rescue.iso /mnt/rescue iso9660 rw,user,noauto 0 0

Execute the following command.

mkdir /mnt/rescue

This makes the mount point you put in /etc/fstab.

Execute the following command.

mount -o loop /mnt/rescue

now all the salvagable data will be in the directory

/mnt/rescue

You can copy it to a new cd.

Echoes "I love Avril" vertically.

echo -n "I love Avril" | dd cbs=1 conv=unblock 2> /dev/null


Cloning an entire hard disk:

dd if=/dev/sda of=/dev/sdb conv=notrunc,noerror

Sunday, October 14, 2012

Unlimited openvz setup

source: http://blog.eukhost.com/webhosting/how-to-remove-openvz-limits-on-a-vps/


These are the commands useful for quick removal of limits on a VPS. These is valuable while making OpenVZ ready and available in a load balanced or busy environment.
Note:”save” will save them in the configuration file for when you restart it. The settings will be lost if you do not supply the argument when the VPS is rebooted.
Use the below stated syntax if you see something that is near the limit use
clear; cat /proc/user_beancounters
vzctl set 101 –tcpsndbuf 999999999:999999999 –save
vzctl set 101 –tcprcvbuf 999999999:999999999 –save
vzctl set 101 –numtcpsock 999999999:999999999 –save
vzctl set 101 –numflock 999999999:999999999 –save
vzctl set 101 –othersockbuf 999999999:999999999 –save
vzctl set 101 –numothersock 999999999:999999999 –save
vzctl set 101 –numfile 999999999:999999999 –save
vzctl restart 101
These are the errors you migh receive without limits being raised
[crit] (105)No buffer space available: alloc_listener: failed to get a socket for 127.0.0.1
Related Posts Plugin for WordPress, Blogger...