Archive for the ‘Linux’ Category

Bash tips and tricks

вторник, август 26th, 2008

Nice quick bash book

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html (loops)

How to check if files containt “this” and “that”

grep -i 'for nut in self._foundNuts:' `grep -ril "loop(1):" *`

Display timestamp

date -d @1231351762

Nginx with Rails

вторник, август 19th, 2008

downloaded from here
documentation here
If you want to try different solution check it haproxy (още…)

Debian/Ubunto notes

вторник, юли 15th, 2008

How to save and installed packges

http://www.cyberciti.biz/tips/linux-get-list-installed-software-reinstallation-restore.html

$ dpkg --get-selections > /backup/installed-software.log

# dpkg --set-selections < /backup/installed-software.log

Now your list is imported use dselect or other tools to install the package.
# dselect

Select ‘i‘ for install the software.

Upgrade Debian

http://www.cyberciti.biz/tips/upgrading-debian-sarga-3-to-etch-4.html

Commands

cat /etc/debian_version

Fix the W: There are no public key available for the following key IDs:

4D270D06F42584E6

apt-key update

gpg –keyserver wwwkeys.eu.pgp.net –recv-keys XXXXXXXXXXXXXXXX
apt-key add /root/.gnupg/pubring.gpg
apt-get update

debian tracd initscript

вторник, юли 15th, 2008

Trac startup script.

(още…)

Gentoo Cheatsheet

сряда, юни 11th, 2008

Java install

ls /usr/portage/dev-java/sun-jdk/
emerge -av =dev-java/sun-jdk-1.5.0.13
java-config -L
java-config -S 1
/usr/sbin/env-update && source /etc/profile

Emerge and Equery

Taken from here

emerge brings in new packages. equery looks at the package database.

update repository:
emerge –sync
install package with query
emrge -av sun-jdk
start with this software
emerge links wget htop
emerge …
manipulate package database
emerge -NDtu world
–update packages and packages that depend on updated packages (–deep) in the world list. Give output in –tree format. Consider packages changed if their USE flags have changed (–newuse, -N) Add –pretend (-p) to just see what it will do first.
emerge –skipfirst …
skip first pkg on a rebuild; very useful if something doesn’t work
equery …
query package database
equary belongs
who owns these files?
equery list
list packages on system

Maintenance

Taken from here

Do this whenever you want a steaming pile of fresh packages.

# emerge --sync
# emerge --update system
# etc-update
if necessary
# emerge --update world

I have seen Meddle to do it this way

emerge –newuse –deep –update world
emerge –ask –verbose coreutils
emerge –resume

Fix the mktemp / coreutils block in Gentoo

Looks like mktemp is now provided by coreutils. No wonder. This block has been bugging me (read: I’ve been ignoring it) for months.

To fix just unmerge mktemp and update coreutils.

Update: Same for the setarch / util-linux block should you come across it. Unmerge setarch.

Search engines

вторник, юни 3rd, 2008

It seems that I know too little for the world of the search engines. I will try to summarize the search engines that can be used for real applications. (още…)

Dual Monitors with NVidia

вторник, май 20th, 2008

aptitude install nvidia-glx-new
aptitude install nvidia-settings

Some options that you can put in the Screen section

/etc/X11/xorg.conf
Option “NoLogo” “True”
Option “RenderAccel” “True”
# This turns on NVidias TwinView
Option “TwinView”
# Option “MetaModes” “1280×1024″ “1152×864″ “1024×768″
# LeftOf, RightOf, Below, Above, or Clone.
# Option “TwinViewOrientation” “LeftOf”

Programs for Linux

понеделник, май 12th, 2008

Ubunto repositories

http://getdeb.net/

winetricks

wget www.kegel.com/wine/winetricks
example: ./winetricks winver=winxp
example: ./winetricks vcrun2005

http://www.virtualbox.org/

Disk managment
KDirStat and Baobab

Security

http://pakiti.sourceforge.net/ – monitor and install patches on multiple servers, supports ubunto, and rh

games

LiveCD

Software and Tutorial Links

четвъртък, май 8th, 2008
IPTables
Linux firewall with packet string-matching support
http://www.securityfocus.com/infocus/1531
Firewall scripts
http://linuxfirewall.start.bg/
http://www.puschitz.com/FirewallAndRouters.shtml
Debian Kernel how-to
http://myfreesoft.net/phpBB2/viewtopic.php?t=52 * in Bulgarian *
Source: http://www.howtoforge.com/forums/showthread.php?t=21
http://www.howtoforge.com/kernel_compilation_debian
Active Ports (Windows)
http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx
Security and Audits Checks & updates
http://sourceforge.net/projects/advchk
RedHat – http://www.redhat.com/spacewalk/