Posts

Showing posts with the label linux

Copying files from remote to localhost

Just for Linux Remote host to localhost: username@remotehost.com:file /local_directory/  From localhost to Remote host scp file username@remotehost.com:/remote_directory/ 

Prevent ssh timeouts

Locally add the following to ~/.ssh/config ServerAliveInterval 120 # null packet every 120 seconds On the server side add the following: ClientAliveInterval 120 # null packet every 120 seconds ClientAliveCountMax 720 # 24hs Done!

fail2ban unban ip

To search all the ips that were banned we enter interactive mode: $ fail2ban-client -i Then we check a jail status, for example sshd : > status sshd the output: Status for the jail: sshd |- Filter |  |- Currently failed: 0 |  |- Total failed: 27 |  `- File list: /var/log/auth.log `- Actions    |- Currently banned: 37    |- Total banned: 38    `- Banned IP list: <a big list of banned ips> So, if we want to unban a particular ip address, let's say X Then, we execute: > set ssh unbanip (within interactive mode) Lastly, if you want to execute it directly from command line: $ fail2ban-client get <JAIL> actionunban <IP-ADDRESS> That's all.

My own scheme color for ninja ide! :)

{     "keyword": "#228b22",     "operator": "#242424",     "brace": "#228b22",     "definition": "#6495ed",     "string": "#ff8c00",     "string2": "#838b83",     "comment": "#8b8878",     "properObject": "#8b0a50",     "numbers": "#ff4500",     "spaces": "#000000",     "extras": "#ffff00",     "editor-background": "#eeeee0",     "editor-selection-color": "#ebc79e",     "editor-selection-background": "#8b8878",     "editor-text": "#242424",     "current-line": "#6ca6Cf",     "selected-word": "#a2cd5a",     "fold-area": "white",     "fold-arrow": "darkGray" } Ninja-Ide Homepage!

Delete all the "Thumbs.db" files - Mac Os Lion

First, find out how many of them you have, by running this command: find . -iname "Thumbs.db" And just run the following command in the base folder from where to erase them: find . -iname "Thumbs.db" -delete source

Extract audio (in mp3 format) from a .flv file - Ubuntu 11.04

Open a console and run: sudo apt-get install ffmpeg libavcodec-extra-52 ffmpeg -i file.flv -ar 44100 -ab 160 -ac 2 audio.mp3

Show Desktop with Hot Corner (hover) - Ubuntu 11.04

This effect can be done using compiz! First, install Compiz Settings Manager from the repositories Go to " General " and click " General Options " Look for " Key Bindings " tab, and under it select " Show Desktop " (the one with a monitor icon) Finally select " Bottom Left " (for example)

ExposƩ Mac Os X like in Ubuntu 11.04

This effect can be done using compiz! First, install Compiz Settings Manager from the repositories Under " Filter ", filter by the keyword "scale" Finally, select " Scale " and in the " Binding " tab, assing a method to " Iniciate Windows Picker " (with the monitor icon). For example: " BottomRight "

Sysmonitor Indicator Ubuntu 11.04 Natty Narwhal

Image
sudo add-apt-repository ppa:alexeftimie/ppa sudo apt-get update sudo apt-get install indicator-sysmonitor source

Weather Indicator Applet Ubuntu 11.04 Natty Narwhal

Image
indicator-weather sudo apt-get install indicator-weather

Fix file permissions in Mac OS X

A few days ago I copied a bunch of files/folders from an external NTFS formatted hard drive to my MacBook. The files where copied ok, but the permissions where messed up. How did I fix them? With this simple command: $ chmod -Rv u=rwx,g=rx,o=r username path_to_base_folder It recursively goes through all files and folders and fix their permissions. Source!

Playing DVDs Ubuntu 10.04

Playing DVDs In order to play DVDs you must install some additional software. Unfortunately, DVD support cannot be provided by default in Ubuntu due to legal restrictions in some countries. Read about restricted formats before following the instructions below. There are some legal issues that you should be aware of. Install the libdvdnav4 , libdvdread4 , gstreamer0.10-plugins-bad and gstreamer0.10-plugins-ugly packages. If you would like to play encrypted DVDs, press Applications → Accessories → Terminal and type the following into the screen which appears, followed by the Enter key: sudo /usr/share/doc/libdvdread4/install-css.sh Enter your password if prompted. The libdvdcss2 package will be downloaded and installed from a website. Insert a DVD into your drive. It should open automatically in the Movie Player. from help.ubuntu.com

How to Install NVIDIA drivers manually on Lucid Lynx Ubuntu 10.04

Download Newest Nvidia drivers from their website Open module blacklist as admin Code: sudo gedit /etc/modprobe.d/blacklist.conf Add these lines and save: Code: blacklist vga16fb blacklist nouveau blacklist rivafb blacklist nvidiafb blacklist rivatv Uninstall any previously installed Nvidia drivers: Code: sudo apt-get --purge remove nvidia-* Reboot your computer When an error message pops up saying that Ubuntu cannot load Nvidia drivers, choose Exit to terminal (Exit to console) Login and cd to the directory where you saved your file Install drivers Code: sudo sh NVIDIA-Linux-x86_64-195.36.24-pkg2.run Start GDM Code: sudo service gdm start Enjoy Enjoy :)

SCP (Secure Copy)

Copying file to host: scp SourceFile user @ host : directory / TargetFile Copying file from host: scp user @ host : / directory / SourceFile TargetFile scp user @ host : / directory / SourceFile TargetFolder Note that if the remote host uses a port other than the default of 22, you can specify it in the command. For example, copying a file from host: scp -P 2222 user @ host : directory / SourceFile TargetFile

Tab Mix Plus

Image
Tab Mix Plus 0.3.8.4 enhances Firefox's tab browsing capabilities. It includes such features as duplicating tabs, controlling tab focus, tab clicking options, undo closed tabs and windows, plus much more. It also includes a full-featured session manager. Updated:June 17, 2010 Website: here Works with: Firefox 3.0 - 3.7a6pre Rating: Rated 4 out of 5 stars 1,443 reviews Downloads: 13,993,487 (28/8/10)

gmapcatcher, an offline map viewer

Image
Overview GMapCatcher is an offline maps viewer. It downloads tiles automatically from many providers such as: CloudMade , OpenStreetMap , Yahoo Maps , Google Map . It displays them using a custom GUI. User can view the maps while offline. GMapCatcher doesn't depend on google-map's java scripts so it should work even if google changes them. It also provides a downloading tool. GMapCatcher is written in Python 2.6, can run on Linux, Windows and Mac OSX. You can find a list of improvements and latest features in the Changelog Download http://gmapcatcher.googlecode.com/files/GMapCatcher-0.7.2.0.tar.gz or $ svn checkout http : //gmapcatcher.googlecode.com/svn/trunk gmapcatcher For Windows users, get the latest Windows installer Usage maps.py is a gui program used to browse google map. With the offline toggle button unchecked, it can download google map tiles automatically. Once the file downloaded, it will reside on user's hard disk and needn't to be downloa...

Adding Themes to Empathy

Image
To install themes (like adium themes) extract the downloaded file and move the *.AdiumMessageStyle into the folder .local/share/adium/message-styles/*.AdiumMessageStyle You will need to create this folder

Netspeed

Image
What is Netspeed? Netspeed is just a little GNOME-applet that shows how much traffic occurs on a specified network device (for example eth0). You get the best impression of it, if you look at the screenshots below. How does it look like? This screenshot shows netspeed monitoring a W-Lan device. How to Install sudo apt-get install netspeed

Hp photosmart 7260 under Ubuntu 10.04

The problem: The printer hangs when i try to print a document (any type). At launchpad.net a ticket was submited with the same problem. A Suggestion, update to last version of hp-lib (the actual version es 3.10.5). Run hp-check -t (the first line says your installed version) Update to your last version using Synaptic, searching for hp as keyword. The solution: change the default: hp:/usb/photosmart_7200_series?serial=XXXXXXXXXXXX to: usb://hp/photosmart%207200%20series?serial=XXXXXXXXXXXX Edit this from System->Administration->Printing Select the desire printer-> Properties Under device Uri: edit what i said before. Note: XXXXXXXXXXXX is written by default, copy it straightforward Its represent your printer serial number. This solution was submitted by ben_reily at launchpad

Creating Iso files from directories

mkisofs -o name.iso directory