<a href="link location">link name</a>Selasa, 7 Mei 2013
How To Insert Link Into Your Blog Comments
Rabu, 14 November 2012
3rd Party Repository: Google Chrome
This repository is available for: Stable
| Title: | Chrome browser in Google repos |
| Description: | Google Linux repository on dl.google.com. |
| Daily Build: | no |
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
Setup repository with:
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'Setup package with:
sudo apt-get update sudo apt-get installwhere
Sabtu, 17 Mac 2012
Khamis, 15 Mac 2012
enable mod userdir under apache2
1. sudo a2enmod userdir
2. service apache2 restart
To enable php you need to comment out ifModule userdir in php5.conf
Selasa, 3 Januari 2012
Mount qemu harddisk image in linux
qemu-img info image.img
image: image.img2. second step is to convert the image format to RAW format:
file format: qcow2
virtual size: 2.0G (2147483648 bytes)
disk size: 201M
cluster_size: 65536
qemu-img convert –f qcow2 image.img –O raw image-raw.img
3. get the offset for mount option
fdisk -u -l image-raw.img
Disk image-raw.img: 2147 MB, 2147483648 bytesThen I have the sector size (512 in my case) and the offset (16065, start sector of my partation), so the offset should be 512*16065= 8225280 (btw, you can calculate with bc:
255 heads, 63 sectors/track, 261 cylinders, total 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
image-raw.img1 * 16065 4192964 2088450 83 Linux
echo ‘512*16065’ | bc)4. Create mount point mkdir /mnt/image
5. mount the image
mount -t ext4 -o loop,offset=8225280 image-raw.img /mnt/image
file type (-t ext4 ) can be identify from fdisk output above. System -- Linux. alternatively you can run the image under qemu to see the OS. i.e qemu image-raw.img
Selasa, 29 November 2011
Compiling/Running Java Programs in Notepad++
Based on the powerful editing component Scintilla, Notepad++ is written in C++ and uses pure Win32 API and STL which ensures a higher execution speed and smaller program size. By optimizing as many routines as possible without losing user friendliness, Notepad++ is trying to reduce the world carbon dioxide emissions. When using less CPU power, the PC can throttle down and reduce power consumption, resulting in a greener environment.
Download at http://notepad-plus-plus.org/download/
To compile and execute java class file, just install NPPExec plugin (Plugins --> Plugin Manager --> Show Plugin Manager), restart N++.
Write a simple Hello World java file and press F6. Enter the following code -->
javac "$(FULL_CURRENT_PATH)"
java -classpath "$(CURRENT_DIRECTORY)" "$(NAME_PART)"
Jumaat, 14 Oktober 2011
reinstall grub2 after windows setup
This operation will write to the MBR and restore the modules and core.img to /boot/grub. It will not replace or restore grub.cfg or fix corrupted files.
- Boot the LiveCD Desktop.
Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.
Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L".
sudo fdisk -l
If the user isn't sure of the partition, look for one of the appropriate size or formatting.Running sudo blkid may provide more information to help locate the proper partition, especially if the partitions are labeled. The device/drive is designated by sdX, with X being the device designation. sda is the first device, sdb is the second, etc. For most users the MBR will be installed to sda, the first drive on their system. The partition is designated by the Y. The first partition is 1, the second is 2. Note the devices and partitions are counted differently.
- Mount the partition containing the Ubuntu installation.
sudo mount /dev/sdXY /mnt
Example: sudo mount /dev/sda1 Note: If the user has a separate /boot partition, this must be mounted to /mnt/boot Note: If the user has a separate /home partition, this must be mounted to /mnt/home. Encrypted home partitions should work.
Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.
sudo grub-install --root-directory=/mnt /dev/sdX
Example: sudo grub-install --root-directory=/mnt /dev/sda
Rabu, 4 Mei 2011
Ubuntu 11.04 - freezes during or after booting the system
On Ubuntu is in the /etc/default/grub file, it should look like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=off".
On other systems, find the kernel boot options and add 'pcie_aspm=off' to it. I am guessing that the NP8150 and NP8170 are also susceptible to this problem as well.
Happy Linuxing!
Isnin, 2 Mei 2011
Fedora installation using ISO/Grub2
I then booted into an old Fedora install (that I was planning to overwrite.) The Ubuntu partition was /dev/sda6. So, I added to the old Fedora grub.conf
title Fedora Boot
root (hd0,5)
kernel (hd0,5)/iso/vmlinuz fromiso=/iso/f14.iso
initrd (hd0,5)/iso/initrd.img
Jumaat, 29 April 2011
Ubuntu Unity Keyboard Shortcuts
Unity Shortcuts
- Super (Win key) – This open the activities menu (Launcher)
- Super+A – Brings up the applications menu and allows you to perform search
- Super+F1 – Focuses on the Launcher, use arrow keys to navigate and press enter to select
- Super+W – Expo mode, zoom out on all windows in all workspace and lets you to move them
- Shift+Alt+ Up - Expo mode for all windows in the current workspace only
- Super+D – Minimize all windows; hitting it again restores them
- CTRL+Alt+Left/Right/Up/Down – Change to a new workspace
- Super+S – Expo mode, zooms out on all the workspaces and let’s you manage windows
- Super+F - Opens Files & Folders menu
Window Shortcuts
These shortcuts can be used in any environment as well in Unity.
- Alt+Tab – Switches between currently open windows
- Alt+F7 – Moves the current window (can be moved with mouse or keyboard)
- Alt+F8 – Resizes current window (again,can be moved with mouse or keyboard)
- Alt+F9 – Minimises current window
- Alt+F10 - Maximises current window
- Alt+Space – Brings up window menu with various options as minimize, maximize, move…etc
- Alt+F5 – Returns window to ‘normal’ or previous size
- Alt+F4 – Closes window
Terminal Shortcuts
You can use these shortcuts when you are using the terminal (Ctrl+Alt+T).
- Ctrl + A – Move cursor to beginning of line
- Ctrl + E – Move cursor to end of line
- Ctrl + C – kills the current process
- Ctrl + Z – sends the current process to the background
- Ctrl + D – logs you out
- Ctrl + R – finds the last command matching the entered letters
- Enter a letter, followed by Tab + Tab – lists the available commands beginning with those letters
- Ctrl + U – deletes the current line
- Ctrl + K – deletes the command from the cursor right
- Ctrl + W – deletes the word before the cursor
- Ctrl + L – clears the terminal output
- Shift + Ctrl + C – copy the highlighted command to the clipboard
- Shift + Ctrl + V (or Shift + Insert) – pastes the contents of the clipboard
- Alt + F – moves forward one word
- Alt + B – moves backward one word
- Arrow Up/Down – browse command history
- Shift + PageUp / PageDown – Scroll terminal output
Compiz Shortcuts
Some of these shortcuts requires Compiz Desktop effects enabled.
- Alt + Tab – switch between open windows
- Win + Tab – switch between open windows with Shift Switcher or Ring Switcher effect
- Win + E – Expo, show all workspace
- Ctrl + Alt + Down – Film Effect
- Ctrl + Alt + Left mouse button – Rotate Desktop Cube
- Alt + Shift + Up – Scale Windows
- Ctrl + Alt + D – Show Desktop (Only in GNOME)
- Win + Left mouse button – take screenshot on selected area
- Win + Mousewheel – Zoom In/Out
- Alt + Mousewheel - Transparent Window
- Alt + F8 – Resize Window
- Alt + F7 – Move Window
- Win + P – Add Helper
- F9 - show widget layer
- Shift + F9 – show water effects
- Win + Shift + Left mouse button – Fire Effects
- Win + Shift + C – Clear Fire Effects
- Win + Left mouse button – Annotate: Draw
- Win + 1 – Start annotation
- Win + 3 – End annotation
- Win + S – selects windows for grouping
- Win + T – Group Windows together
- Win + U – Ungroup Windows
- Win + Left/Right – Flip Windows
Nautilus Shortcuts
You might want to remember some these combinations like the one to create new folder or rename a file.
- Shift + Ctrl + N – Create New Folder
- Super + T - Opens the Trash can (recycle bin)
- Alt + Home – Opens Home
- Ctrl + T – Delete selected file(s) to trash
- Alt + ENTER – Show File/Folder Properties
- Ctrl + 1 – Toggle View As Icons
- Ctrl + 2 – Toggle View As List
- Shift + Right – Open Directory (Only in List View)
- Shift + Left – Close Directory (Only in List View)
- Ctrl + S – Select Pattern
- F2 – Rename File
- Ctrl + A – Select all files and folders
- Ctrl + W – Close Window
- Ctrl + Shift + W – Close All Nautilus Windows
- Ctrl + R – Reload Nautilus Window
- Alt + Up – Open parent directory
- Alt + Left – Back
- Alt + Right – Forward
- Alt + Home – go to Home folder
- Ctrl + L – go to location bar
- F9 – Show sidepane
- Ctrl + H – Show Hidden Files
- Ctrl + + – Zoom In
- Ctrl + - – Zoom Out
- Ctrl + 0 – Normal Size
Common Application Shortcuts
These shortcuts do not apply in all applications, but usually perform the functions listed below.
- Ctrl + C – Copy the selected text/object
- Ctrl + X - Cut the selected text/object
- Ctrl + V – Paste/insert the selected text/object
- Ctrl + A – Select all text
- Ctrl + B – Make the selected text bold
- Ctrl + I – Make the selected text italic
- Ctrl + U - Underline the selected text
- Ctrl + N - Open a new document or window
- Ctrl + S - Save the current document
- Ctrl + O - Open another document
- Ctrl + P - Print the current document
- Ctrl + Z - Undo the last change you made
- Ctrl + Shift + Z - Redo a change that you just undid
- Ctrl + Q – Quit the current application
Useful Shortcuts
- Alt + F2 Run an application by typing its name in the box which appears
- Prt Sc (Print Screen) Take a screenshot of the whole screen
- Alt + Prt Sc Take a screenshot of the current window
- Alt+Ctrl+Del – Restart the system
- Alt+Ctrl+L - Lock the screen
Mouse Tricks
- Tiling – Dragging a Window to the left/right border will auto tile it to that side of the screen
- Maximization – Dragging a window to the top panel will maximize it
- Unmaximize – Dragging the top panel down on a maximized window will unmaximize it
Khamis, 21 April 2011
Linux - Video Resolution Tools and Command
1. xresprobe [driver=vesa,ati,nv,nvidia,i810]
2. ddcprobe
In ubuntu is not install by default. To install apt-get install xresprobe
To check/modify resolution
1. xrandr
more info
http://ubuntuforums.org/showthread.php?t=83973
Isnin, 18 April 2011
Batch resize photo
In Linux, if you have installed ImageMagick suite, you can use a nifty command to resize images, photos or pictures. The name of the command line tool is mogrify. Here is how it is done.
Suppose you want to resize all your images to a size of 800×600.
You open a terminal and navigate to the directory containing your images, photos or pictures.
Create a directory in the location named “resized-pictures” as follows :
$ mkdir resized-pictures
Now run the mogrify command from the same location.
$ mogrify -path ./resized-pictures/ -resize 800x600 *.jpg
The above command will resize all the jpeg pictures in the current directory to a 800×600 size and save the output to the resized-pictures/ directory leaving the original pictures intact.
Note: You can also run the mogrify command without the -path option; in which case, all the images will be resized and overwritten in the current directory itself.
#!/bin/bashREf:
for i in *.jpg
do
echo "I am resizing the $i image....."
# writes to a new file, the old one survives
#convert -resize 800x600 $i
# writes to the same file, the old one will vanish
mogrify -resize 800x600 $i
echo "Image $i has been resized."
done
1.http://www.devdaily.com/blog/post/linux-unix/use-imagemagick-mogrify-command-resize-images
2. http://linuxandfriends.com/2009/08/10/mogrify-how-to-resize-images-from-the-command-line/





