Saturday, October 12, 2013

Auto Mount Partitions In Ubuntu 13.10 (12.**)




Step1: Install ntfs-3g

sudo apt-get install ntfs-3g

Step2:

Get the “sda” number for the partition which needs to be auto mounted. To find this use the two commands


sudo fdisk -l

sudo blkid







STEP 3:


Then, create the mount point for that device:
sudo mkdir /media/musicdrive

STEP 4

Open /etc/fstab file for editing:
gksudo gedit /etc/fstab


and add the line of code below to the last part of the file:
/dev/sda2 /media/musicdrive ntfs-3g defaults 0 0                     


for windows partition instead of /dev/sda.. UUID number is used.


Copy of fstab


# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda9 during installation
UUID=01a9cdf0-e55c-4669-9220-ecd9bd5d38cb /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda7 during installation
UUID=0758fa40-d29b-4975-940f-4942ea0adc8c none            swap    sw              0       0
/dev/sda3 /media/Academic ntfs-3g defaults 0 0
/dev/sda5 /media/Media ntfs-3g defaults 0 0
UUID=84C23259C2324FA2 /media/Windows          ntfs-3g defaults 0 0   

Install LAMP




sudo apt-get install tasksel
sudo  tasksel


And select LAMP Server:
During the installation  you  will be  asked  to insert the  mysql root  password


Now check if php is working :


sudo vi /var/www/info.php
and add
<?php
phpinfo();
?>
save and exit
restart apache2 ,
sudo /etc/init.d/apache2 restart


Now open browser and type :
http://ip/info.php or http://localhost/info.php
Php is installed.




To full manage  your  lamp Server database, install  phpmyadmin
sudo  apt-get  install  phpmyadmin


To login  to phpmyadmin, open browser and type :
http://ip/phpmyadmin   or http://localhost/phpmyadmin

Install Joomla in Ubuntu



Download joomla 3.0 from joomla official website. then create directory
joomla  in the default apache folder /var/www


sudo mkdir /var/www/joomla


Extract joomla package has been downloaded in to directory /var/www/joomla



sudo unzip -q Joomla_3.0.1-Stable-Full_Package.zip -d /var/www/joomla 




Change access /var/www/joomla to apache user and group (www-data) and set permission /var/www/joomla 775


sudo chown -R www-data.www-data /var/www/joomla/
sudo chmod -R 777 /var/www/joomla/

Install Sinhala In Ubuntu


For Ubuntu 13.10


Download m17 library from here.

Extract the file


tar zxf
m17n-db-1.6.4.tar.gz
Now change directory

$ ls
$ cd path-to-software/

Generally you need to type 3 commands as follows for building and compiling the software:

$ ./configure
$ make
$ sudo make install

 Choose Text Entry from 1
Select sinhala from the list when you get from 2

For other Versions

http://www.m17n.org/m17n-lib-download/m17n-contrib-1.1.13.tar.gz



Download the latest m17n library.
then install it. See installing tar.gz in linux commands
  • apt-get install ttf-sinhala-lklug ibus im-switch ibus-m17n m17n-db m17n-contrib
  • From your user account (i.e. not root) run:
  • rm -f ~/.xinput.d/* ; im-switch -z all_ALL -s ibus
login and logout

How to create a jar in intellij idea project




project structure ---> Artifacts( project settings ) → + jar ---> from module with dependencies → add available elements as you prefer ---> apply okay. next from the file menu Build Build artifact

COD Server Setup










\rcon login 12345
\rcon g_gametype sd
\rcon g_gametype war
\rcon map mp_crash
\rcon map mp_strike


\rcon class_sniper_limit 7

\rcon class_specops_limit 7`

\rcon scr_game_allowkillcam 1

\rcon set g_deadchat 1

\rcon g_allowvote 1

\rcon scr_allowvote 1
`

/rcon map_restart
/rcon status
/rcon clientkick (number)
/rcon promod_mode match_mr10_pb - Promod match with max rounds 10.

rcon class_sniper_limit #
rcon class_specops_limit #
/rcon login (rcon password) - Give you admin rights.`
/rcon map_restart - Restart the map.
/rcon map mp_crash - Loads the map crash, if you want an other map just type your mapname.
/rcon status - Shows the PB guids, client numbers.
/rcon clientkick (number) - Kicks the player with the linked clientnumber.
/rcon set class_sniper_limit # writes it to cfg
/g_gametpye //use one of the variables in the line below.. example: /g_gametype war would change it to teamdeathmatch.(DM = Deathmatch , WAR = Teamdeathmatch , KOTH = Headquaters, SD = Search & Destroy, DOM = Domination, SAB = Sabotage)
ENABLE KILL CAM: /rcon scr_game_allowkillcam 1
BANNING PLAYERS: /rcon banclient (player id)
\rcon set g_deadChat 1


/rcon fast_restart - Restart the scores.
/rcon map mp_crash - Loads the map crash, if you want an other map just type your mapname.
/rcon status - Shows the PB guids, client numbers.
/rcon clientkick (number) - Kicks the player with the linked clientnumber.
/rcon kickall - Kicks everyone on the server.
Rcon commands promod 2.04
/rcon promod_mode 2v2_mr10 - Promod 2v2 with max rounds 10.
/rcon promod_mode match_mr12 - Promod match with max rounds 12.
Rcon commands promod 2.11
/rcon ` - Promod 2v2 with max rounds 10.
/rcon promod_mode match_mr12_pb - Promod match with max rounds 12.
/rcon promod_mode comp_public - Promod competitive public.

mp_backlot
mp_bloc
mp_bog
mp_cargoship
mp_citystreets
mp_convoy
mp_countdown
mp_crash
mp_crossfire
mp_farm
mp_overgrown
map mp_pipeline
mp_shipment
mp_showdown
mp_strike
mp_vacant

/rcon_password //this is your remote control password
/rcon login //You can login in your Remote Control with this command.(can only use with a dedicated server and when you have set a rcon password!)
/rcon say //say something via Console. (this can only be used when you are logged in with /rcon login!)
/rcon clientkick //with this command you can kick players with their ID(first type /rcon status so that you see what client is who!)
/rcon status //shows the player list with ID's, IP's, guids, maxrate etc.
/rcon banclient //with this command you can Ban players with their ID..(their guid will be banned and placed in a txt file in your call of duty 4/main folder! -> txt file is named ban.txt)
/rcon playerkick or /rcon kickplayer //with this you can kick a player by his Name!

/rcon killserver //kills the server. Also known as shutting down the server.


/g_gametpye //use one of the variables in the line below.. example: /g_gametype war would change it to teamdeathmatch.(DM = Deathmatch , WAR = Teamdeathmatch , KOTH = Headquaters, SD = Search & Destroy, DOM = Domination, SAB = Sabotage)

/scr_dm_timelimit //sets the Deathmatch time untill the game ends.
/scr_dm_scorelimit //sets the Deathmatch score needed to win the game.
/scr_dm_roundlimit //sets the maximum Deathmatch rounds played for the gametype each level.

/scr_war_timelimit //sets the Teamdeathmatch time untill the game ends.
/scr_war_scorelimit //sets the Teamdeathmatch score needed to win the game.
/scr_war_roundlimit //sets the maximum Teamdeathmatch rounds played for the gametype each level.

/scr_koth_timelimit //sets the Headquaters time untill the game ends.
/scr_koth_scorelimit //sets the Headquaters score needed to win the game.
/scr_koth_roundlimit //sets the maximum headquaters rounds played for the gametype each level.

/scr_sd_timelimit //sets the Search & Destroy time untill the game ends.
/scr_sd_scorelimit //sets the Search & Destroy score needed to win the game.
/scr_sd_roundlimit //sets the maximum search and Destroy rounds played for the gametype each level.

/scr_dom_timelimit //sets the domination time untill the game ends.
/scr_dom_scorelimit //sets the domination score needed to win the game.
/scr_dom_roundlimit //sets the maximum domination rounds played for the gametype each level.

/scr_sab_timelimit //sets the sabotage time untill the game ends.
/scr_sab_scorelimit //sets the sabotage score needed to win the game.
/scr_sab_roundlimit //sets the maximum sabotage rounds played for the gametype each level.

/map_restart //restarts the map
/fast_restart //restarts the map quickly, without changing the map again. NOTE:It will stay the same map!

/sv_hostname //server name
/sv_maxclients //maximum clients allowed to join your server (choose a number between 1 and 64)

/sv_maxping //maximum connection ping allowed. (choose a number between 1 and 999)
//NOTE: Most clients have 100 ping or higher so don't set it below 100 if you want players in your server!!
/sv_minping //minimum connection ping needed to join your server(you don't need this one normally!)

/sv_maprotation //this is your server's maprotation.
//example: /sv_maprotation g_gametype war map mp_backlot g_gametype dm map mp_crossfire g_gametype war map mp_overgrown g_gametype war map mp_crash

You login by typing in the following:

/rcon login (password) ~ Replace password with the rcon pass without brackets.


Kick/ban/msg players

/status ~ Displays information for all connected players in the server.

/tell (player id) ~ Sends a message to a specific player in the server via console (the message will appear next to the name ‘console’).

/clientkick (player id) ~ Kicks a specific player from the server.

/kick (player name) ~ Kicks a player from the server, but instead of using the id to identify the player you need to type the players name (colors included).

/banclient (player id) ~ Bans specific player from the server.

/banuser (player name) ~ Bans player by name not id.

/tempbanClient (player id) ~ Temporarily bans a player.

/tempbanUser (player name) ~ Same as above just by name not id.

/unbanuser (player name) ~ Unbans a user by name *note* the easiest way to unban a player is to delete the players name from ban.txt which can be found in the server files located in the server’s FTP.


Changing the map

/map (map name) ~ Type in the map name you want without the brackets. Some of the map names used are different to the console command names. To make things easier here is a list of map names:

mp_backlot
mp_bloc
mp_bog
mp_cargoship (wetworks)
mp_citystreets (district)
mp_convoy (ambush)
mp_countdown
mp_crash
mp_crossfire
mp_farm
mp_overgrown
mp_pipeline
mp_shipment

/map_rotate ~ Loads the next map in rotation.

/map_restart ~ Restarts the current map.

/fast_restart ~ Restarts the map without loading.


Restarting server

/killserver ~ Shuts the server down.

/Quit ~ Restarts the server.

The above is just a list of the most common commands you will need to know as a server admin. There are however alot more commands.


Server Mode

set scr_hardcore ~ Player’s HUD is limited, bullet damage is higher, friendly fire is on.

set scr_oldschool ~ No classes. Weapons are pickups, health is in a gauge form and can be increased with medipacks also jumps are higher.

set scr_oldschool_mw ~ Same as above, just for modded servers?


Spectator permissions

set scr_game_spectatetype ~ Toggle spectating type.

set g_deadChat ~ Toggle dead chat.


*Edit* Remember to type /rcon before each command and not the command by itself.
f.e. /rcon map_restart

a