Vagrant for developers

I have been using vagrant for a week now and I must say it’s a really nice tool. Vagrant for those who don’t know, it’s basically a virtual machine (based on VirtualBox but has also other options).

Why do i find it cool

- Fast to setup (You can choose one of the images from vagrantcloud and will install it in a few min)

- Have the same environment in different operating system (no matter if you start developing in linux and end up developing under windows, you can use the same setup)

- Share the same environment with other developers

- Share your http/ssh or other port in the internet (Vagrantcloud generates a url where you can send other people to your vm)

These are just some of the things I’ve been using and enjoyed with vagrant it has more features and it is getting better every time.

http://www.vagrantup.com/

Vagrant

Vagrantup

Xfce right click menu lag

If you use xfce, on some version if you right click on the desktop it might delay for a second, there’s an easy fix for that, all you need to do is Right click on the desktop “Desktop Settings” and “Menus” tab, and  disable “Show applications icons.”.

Screenshot - 02122014 - 02:19:23 PM

Starting to develop apps on Android

I am starting to develop apps on android, this might help me with java too, since I will be learning it more in depth in my second semester.

Android_robot.svg

My First Ruby on Rails project

I will be working on my first ruby on rails project with the admin interface.

I found this great tutorial from DigitalOcean that shows how to get everything installed on ubuntu 12.04, I am also looking on how to install it on my home computer with fedora 18

 

rubyonrails

Alfresco Bulk Filesystem Import Tool

post from my other blog at http://ylbd.blogspot.com/

 

get the tool

http://code.google.com/p/alfresco-bulk-filesystem-import/downloads/list

 

use the alfresco module managing tool

http://wiki.alfresco.com/wiki/Module_Management_Tool

 

 

Installation Steps

The following steps describe how to download and install the Alfresco Bulk Filesystem Import Tool:

  1. Download the latest AMP file containing the tool from here
  2. Shutdown your Alfresco instance (use the .sh inside your alfreso install folder)
  3. Make a backup of the original alfresco.war file. On Tomcat, this is located in ${ALFRESCO_HOME}/tomcat/webapps
  4. Use the Alfresco Module Management Tool to install the AMP file obtained in step 1
  5. Restart Alfresco, watching the log carefully for errors

Running the MMT

Run the following command:

  java -jar alfresco-mmt-2.1.jar [args]

It is compatible with V2.0 WAR files and above.

MMT Commands

The MMT has a number of commands. Details of these are outlined below:

install

usage: install <AMPFileLocation> <WARFileLocation> [options]

valid options:

   -verbose   : enable verbose output
   -directory : indicates that the amp file location specified is a directory.
                All amp files found in the directory and its sub directories are installed.
   -force     : forces installation of AMP regardless of currently installed module version
   -preview   : previews installation of AMP without modifying WAR file
   -nobackup  : indicates that no backup should be made of the WAR

 

Stop Alfresco

:~/alfresco-4.0.d-1$ ./ctlscript.sh stop

/home/ardian/alfresco-4.0.d-1/apache-tomcat/scripts/ctl.sh : tomcat not running

/home/ardian/alfresco-4.0.d-1/mysql/scripts/ctl.sh : mysql stopped

 

Check if alfresco is running

 

ardian@arbk-share:~/alfresco-4.0.d-1$ ps -ef | grep alfresco

ardian   18815 18168  0 11:06 pts/2    00:00:00 grep –color=auto alfresco

 

locate where the alfresco-mmt-2.1.jar is usually its under alfresco install dir in the bin/ 

For me its /alfresco-4.0.d-1/apps/alfresco

 

java -jar alfresco-mmt.jar install ~/alfresco-bulk-filesystem-import-1.1-ALF40.amp ~/alfresco-4.0.d-1/apache-tomcat/webapps/alfresco.war

 

list the modules

 

java -jar alfresco-mmt.jar list ~/alfresco-4.0.d-1/apache-tomcat/webapps/alfresco.war

Module ‘org.alfresco.extension.alfresco-bulk-filesystem-import’ installed in ‘/home/ardian/alfresco-4.0.d-1/apache-tomcat/webapps/alfresco.war’

   –    Title:        Alfresco Bulk Filesystem Import v1.1 (for Alfresco v4.0)

   –    Version:      1.1

   –    Install Date: Wed Jul 25 11:18:19 CEST 2012

   –    Description:   Alfresco Bulk Filesystem Import tool.  Provides high performance bulk loading of content from the server’s filesystem into Alfresco.

 

If you run Alfresco on Linux turn of CIFS: add this

CODE: SELECT ALL
cifs.enabled=false

 

to alfresco-global.properties.

 

 

export BULK=alfresco-bulk-filesystem-import-1.0.amp

 

java -jar $ALFRESCO_HOME/bin/alfresco-mmt.jar install $ALFRESCO_HOME/amps/$BULK $ALFRESCO_HOME/tomcat/webapps/alfresco.war -force -verbose

 

$ apply_amps.sh

 

 

visit

 

 

 

Install Mate on Fedora [Fedora 17]

Fedora

There are stable MATE x86_64/i386 rpms for Fedora 16 and 17. To install them, follow those steps:

  • Fedora 16

    yum install http://dl.dropbox.com/u/49862637/Mate-desktop/mate-desktop-fedora/releases/16/noarch/mate-desktop-release-16-5.fc16.noarch.rpm
    yum install atril
    yum groupinstall MATE-Desktop
  • Fedora 17
    yum install http://dl.dropbox.com/u/49862637/Mate-desktop/fedora_17/mate-desktop-fedora/noarch/mate-desktop-release-17-1.fc17.noarch.rpm
    
    yum install atril
    yum groupinstall MATE-Desktop
    Image

Python Regular ExperssionsGoogle Python Class Day 2 Part 1

MySQL TIPS

If you have never set a root password for MySQL server, the server does not require a password at all for connecting as root. To setup root password for first time, use mysqladmin command at shell prompt as follows:
$ mysqladmin -u root password NEWPASSWORD

However, if you want to change (or update) a root password, then you need to use the following command:
$ mysqladmin -u root -p'oldpassword' password newpass

For example, If the old password is abc, you can set the new password to 123456, enter:

$ mysqladmin -u root -p'abc' password '123456'

Change MySQL password for other users

To change a normal user password you need to type (let us assume you would like to change password for user vivek) the following command:
$ mysqladmin -u vivek -p oldpassword password newpass

Changing MySQL root user password using MySQL sql command

This is another method. MySQL stores username and passwords in user table inside MySQL database. You can directly update password using the following method to update or change password for user vivek:

1) Login to mysql server, type the following command at shell prompt:
$ mysql -u root -p

2) Use mysql database (type command at mysql> prompt):

mysql> use mysql;

3) Change password for user vivek, enter:

mysql> update user set password=PASSWORD("NEWPASSWORD") where User='vivek';

4) Finally, reload the privileges:

mysql> flush privileges;
mysql> quit

ArchLinux connecting to wireless through CLI [WPA]

# iwlist wlan0 scan
Cell 01 - Address: 04:25:10:6B:7F:9D
                    Channel:2
                    Frequency:2.417 GHz (Channel 2)
                    Quality=31/70  Signal level=-79 dBm  
                    Encryption key:off
                    ESSID:"dlink"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s
                              36 Mb/s; 48 Mb/s; 54 Mb/s
  • If using WPA encryption:

Using WPA encryption requires that the key be encrypted and stored in a file, along with the ESSID, to be used later for connection via wpa_supplicant. Thus, a few extra steps are required:

For the purpose of simplifying and backup, rename the default wpa_supplicant.conf file:

# mv /etc/wpa_supplicant.conf /etc/wpa_supplicant.conf.original

Using wpa_passphrase, provide your wireless network name and WPA key to be encrypted and written to /etc/wpa_supplicant.conf.

The following example encrypts the key “my_secret_passkey” of the “linksys” wireless network, generates a new configuration file (/etc/wpa_supplicant.conf), and subsequently redirects the encrypted key, writing it to the file:

# wpa_passphrase linksys "my_secret_passkey" > /etc/wpa_supplicant.conf

Check WPA Supplicant for more information and troubleshooting.

Note: /etc/wpa_supplicant.conf is stored in plain text format. This is not risky in the installation environment, but when you reboot into your new system and reconfigure WPA, remember to change the permissions on /etc/wpa_supplicant.conf (e.g. chmod 0600 /etc/wpa_supplicant.conf to make it readable by root only).
  • Associate your wireless device with the access point you want to use. Depending on the encryption (none, WEP, or WPA), the procedure may differ. You need to know the name of the chosen wireless network (ESSID).
Encryption Command
No Encryption iwconfig wlan0 essid “linksys”
WEP w/ Hex Key iwconfig wlan0 essid “linksys” key “0241baf34c”
WEP w/ ASCII passphrase iwconfig wlan0 essid “linksys” key “s:pass1″
WPA wpa_supplicant -B -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
Note: The network connection process may be automated later by using the default Arch network daemon, netcfgwicd, or another network manager of your choice.
  • After utilizing the appropriate association method outlined above, wait a few moments and confirm you have successfully associated to the access point before continuing, e.g.:
# iwconfig wlan0

Output should indicate the wireless network is associated with the interface.

  • Request an IP address with /sbin/dhcpcd <interface>, e.g.:
# dhcpcd wlan0
  • Lastly, ensure you can route using /bin/ping:
# ping -c 3 www.google.com
PING www.l.google.com (74.125.224.146) 56(84) bytes of data.
64 bytes from 74.125.224.146: icmp_req=1 ttl=49 time=87.7 ms
64 bytes from 74.125.224.146: icmp_req=2 ttl=49 time=87.0 ms
64 bytes from 74.125.224.146: icmp_req=3 ttl=49 time=94.6 ms

--- www.l.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 87.052/89.812/94.634/3.430 ms

SOURCE: From the great ArchLinux wiki at https://wiki.archlinux.org/index.php/Beginners%27_Guide#Setup_wireless_in_the_live_environment_.28optional.29

Poll Test

Follow

Get every new post delivered to your Inbox.

Join 689 other followers

%d bloggers like this: