Search This Blog

2008-05-29

Best shortcuts for Visual Studio 2005 2008

SOURCES:
http://www.dev102.com/2008/05/06/11-more-visual-studio-shortcuts-you-should-know/

//Ctrl + Shift + F -- recursive find
//Ctrl + H -- find and replace
//Ctrl + M + M -- collapse method
//Ctrl + B --- set a break point
//CTRL + “-” and CTRL + SHIFT + “-” -- web browser like backward and forward in code
//Ctrl + Tab --- shift tabs
//Shift + F5 --- stop debugging
//F5 -- start debugging
//Ctrl - { -- Goto next brace ( Ctrl + Å in scandinavian versions .. )
//Ctrl - I --- fast find
//

how-to generate setters and getters in C# with TextPad

// Firts write the data members with Capital leters - for example:

string Boo
int Blah

// select the text , Press F8


//find:^(.*) (.*)$
//private string s\1 ; \n public string \1 { \n \t\t get { return s\1 ; } \n \t\t set { s\1 = value ; } \n } //comm -- eof \1 property \n\n
//
//private \1 _\2 ; \npublic \1 \2 { \n \t\t get { return _\2 ; } \n \t\t set { _\2 = value ; } \n } //eof property \2 \n\n\n


// Copy paste this code in your project as comments, each time when you would have to use it press Ctrl + Shift + F and type :
how-to generate setters and getters

//this will jump you straight to the copy paste spot ...

// Enjoy !

2008-05-27

how-to create a drop down list with all the countries in the world and their iso codes

how-to generate line numbers with textpad

SOURCES:
textpad's helpl
From the Search menu, choose Replace;
In the Find What box type "^" (without the quotes);
In the Replace With box, type "\i " (without the quotes), if the line numbers start at 1, or "\i(100) ", if they start at 100, etc.;
Check the Regular Expression box;
Click Replace All.



How to Generate Sequence Numbers
You can update or insert sequence numbers in a file, using replacement expressions. This is achieved using the Replace dialog box, with the Regular Expression box checked.

The syntax of the replacement expression is:

Expression: Effect:
\i Replace with numbers starting from 1, incrementing by 1.
\i(10) Replace with numbers starting from 10, incrementing by 1.
\i(0,10) Replace with numbers starting from 0, incrementing by 10.
\i(100,-10) Replace with numbers starting from 100, decrementing by -10.


Examples:
To insert line numbers at the start of each line:
Search for:^
Replace with:\i
To update sequence numbers of the form Axxx, Bxxx, … ,Zxxx where "xxx" is any number >= 100, independent of the letters, which are to be preserved:
Search for:\([A-Z]\)[1-9][0-9][0-9]+
Replace with:\1\i(100)

2008-05-26

how-to get the basedir of an web application in C# asp.net

public static string getBaseDir ()
{
string baseDirLocal = System.Web.HttpContext.Current.Server.MapPath ( "~" );
Regex Remover = new Regex ( @"^.*(\\|\/)(.*)$" ,
RegexOptions.IgnoreCase | RegexOptions.Compiled );
string bareDir = Remover.Replace ( baseDirLocal , "$2" );

string strToRemoveAtEnd= System.Web.HttpContext.Current.Request.Url.AbsolutePath;
char [] charsToRemoveAtEnd = strToRemoveAtEnd.ToCharArray ();
string baseDir = System.Web.HttpContext.Current.Request.Url.AbsoluteUri;
baseDir = baseDir.TrimEnd ( charsToRemoveAtEnd );
baseDir = baseDir + "/" + bareDir + "/";
return baseDir;
} //eof method getBaseDir

2008-05-22

How-to export to text file all user written stored procedures in a sql server 2005 database

-- COURTESY OF :
-- Steve Gray

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO

IF EXISTS (SELECT name
FROM sysobjects
WHERE name = N'GetAllProcs'
AND type = 'P')
DROP PROCEDURE GetAllProcs
GO

CREATE PROCEDURE GetAllProcs



AS




DECLARE
@vchrFile VARCHAR(1000) ,
@vchrFileID INT ,
@FS INT ,
@RC INT ,
@vchrStoredProcName varchar(8000),
@vchrChar varchar(1), -- holds the current character that we are evaluating
@vchrLine varchar(8000),-- holds the line that we are about to print
@intPos int,
@vchrPrevChar varchar(1),
@intAscii int,
@intPrevAscii int,
@vchrSysCommentText varchar(8000)



--initialize

SET @vchrFile = 'C:\temp\export.sql'


--===================================================================================
-- open the output file
--===================================================================================
EXEC @RC = sp_OACreate 'Scripting.FileSystemObject', @FS OUT

IF @RC <> 0
PRINT 'Error: Creating the file system object'

-- Opens the file specified by the @vchrFile input parameter
EXEC @RC = sp_OAMethod @FS , 'OpenTextFile' , @vchrFileID OUT , @vchrFile , 8 , 1

-- Prints error if non 0 return code during sp_OAMethod OpenTextFile execution
IF @RC <> 0
PRINT 'Error: Opening the specified text file'

--===================================================================================
--gather data on stored procedure into table _dbText
--===================================================================================
DECLARE curStoredProcs CURSOR KEYSET FOR
select s.name from sysobjects s where type = 'U' order by Name
/*
-- COPY PASTE THE DESIRED TYPES OF OBJECTS ABOVE
--HOW-TO LIST ALL PROCEDURE IN A DATABASE
-- select s.name from sysobjects s where type = 'P' order by Name
--HOW-TO LIST ALL TRIGGERS BY NAME IN A DATABASE
-- select s.name from sysobjects s where type = 'TR' order by Name
--HOW-TO LIST TABLES IN A DATABASE
select s.name from sysobjects s where type = 'U' order by Name
--how-to list all system tables in a database
-- select s.name from sysobjects s where type = 's' order by Name
--how-to list all the views in a database
-- select s.name from sysobjects s where type = 'v' order by Name
*/
OPEN curStoredProcs

FETCH NEXT FROM curStoredProcs INTO @vchrStoredProcName

WHILE (@@fetch_status = 0) BEGIN
set @vchrLine = '-- ####################################################################'
EXEC @RC = sp_OAMethod @vchrFileID, 'WriteLine', Null , @vchrLine
IF @RC <> 0 PRINT 'Error: Writing string data to file'

set @vchrLine = ''
EXEC @RC = sp_OAMethod @vchrFileID, 'WriteLine', Null , @vchrLine
IF @RC <> 0 PRINT 'Error: Writing string data to file'

set @vchrLine = '-- ***** ' + @vchrStoredProcName + ' ***** '
EXEC @RC = sp_OAMethod @vchrFileID, 'WriteLine', Null , @vchrLine
IF @RC <> 0 PRINT 'Error: Writing string data to file'

set @vchrLine = ''
EXEC @RC = sp_OAMethod @vchrFileID, 'WriteLine', Null , @vchrLine
IF @RC <> 0 PRINT 'Error: Writing string data to file'

set @vchrLine = '-- ####################################################################'
EXEC @RC = sp_OAMethod @vchrFileID, 'WriteLine', Null , @vchrLine
IF @RC <> 0 PRINT 'Error: Writing string data to file'

--initialize
select
@vchrLine = '',
@vchrPrevChar = ''

-- =============================================
-- loop through one stored proc
-- =============================================
DECLARE curComments CURSOR LOCAL FOR
SELECT [text] FROM syscomments WHERE id = OBJECT_ID(@vchrStoredProcName) and encrypted = 0
ORDER BY number, colid
FOR READ ONLY

OPEN curComments

FETCH NEXT FROM curComments into @vchrSysCommentText

--loop through the lines in the syscomments table.
--there can be one or many for the stored proc,
--many stored proc lines can be on one syscomments line
WHILE @@fetch_status >= 0
BEGIN
--initialize
select
@intPos = 1

WHILE @intPos <> len(@vchrSysCommentText) BEGIN
select @vchrChar = substring(@vchrSysCommentText,@intPos,1)
select @intAscii = ascii(@vchrChar)

if not (@intAscii = 13 or @intAscii = 10)
select @vchrLine = @vchrLine + @vchrChar

--if we encounter a line feed...
if @intAscii in (10,13) and @intPrevAscii in (10,13) begin
--output a line and clear the line buffer

-- Appends the string value line to the file specified by the @vchrFile input parameter
EXEC @RC = sp_OAMethod @vchrFileID, 'WriteLine', Null , @vchrLine

-- Prints error if non 0 return code during sp_OAMethod WriteLine execution
IF @RC <> 0
PRINT 'Error: Writing string data to file'

select @vchrLine = ''
end


select @intPos = @intPos + 1,
@vchrPrevChar = @vchrChar,
@intPrevAscii = @intAscii

END

FETCH NEXT FROM curComments into @vchrSysCommentText
END

CLOSE curComments
DEALLOCATE curComments


set @vchrLine = ''
EXEC @RC = sp_OAMethod @vchrFileID, 'WriteLine', Null , @vchrLine
IF @RC <> 0 PRINT 'Error: Writing string data to file'
set @vchrLine = ''
EXEC @RC = sp_OAMethod @vchrFileID, 'WriteLine', Null , @vchrLine
IF @RC <> 0 PRINT 'Error: Writing string data to file'


FETCH NEXT FROM curStoredProcs INTO @vchrStoredProcName
END

CLOSE curStoredProcs
DEALLOCATE curStoredProcs

EXECUTE @RC = sp_OADestroy @vchrFileID
EXECUTE @RC = sp_OADestroy @FS

2008-05-20

what is the working hierarchy for web.config files

Couresy of:
shekhar_shashi
SOURCES:
http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_21357027.html?sfQueryTermInfo=1+c+web.config
This is the order in which the ASP.Net worker process reads configuration files is - Machine, Site, Application, SubFolder.
'machine.config' is the only mandatory ASP.Net configuration file - all the rest are optional though you'll need the other web.config files for most of your applications.

Here are the details:

1. Machine
File Name: machine.config
Location: Typically it is found in your operating system's sub directory for Microsoft.Net. My Win2000 machine has this file at this location:
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\CONFIG

Generally you'll put settings that are applicable to all ASP.Net web applications running on your machine here.

Helpful Tip:This file has excellent documentation and samples for the configuration settings that you can do.

2. Site
File Name: web.config
Location: Typically the root web publishing folder. My machine has it at this location:
C:\Inetpub\wwwroot\

3. Application
File Name: web.config
Location: C:\Inetpub\wwwroot\MyWebApp etc. etc.
If you use VS.Net, it creates and puts this file in your web application folder.

4. SubFolder
File Name: web.config
Location: C:\Inetpub\wwwroot\MyWebApp\CustomerWebPages etc.
You can add this configuration to any subfolders in your web application to override the settings for the web pages and controls inside the folder.

ASP.Net worker process reads values from top to bottom and the settings in a lower configuration file override the ones at an upper level. However, not all configuration settings can be put at all levels. Some configruation settings like 'ProcessModel' settings have to be only at machine.config. You cannot put Authentication settings at Subfolder level (if you do, it will be ignored). It should be at Application Level web.config.

While working with config files, it is very important to understand this hierarchy.

how-to get all the columns of a specific datatype in a database

SOURCES:
http://blogs.msdn.com/isaac/default.aspx
SELECT ta.name as table_name, co.name as column_name
FROM sys.tables ta JOIN sys.columns co
ON ta.object_id = co.object_id
JOIN sys.types ty
ON co.user_type_id = ty.user_type_id
WHERE ty.name = 'smalldatetime'

2008-05-19

how-to convert string to smalldatetime , how to convert string to datetime in sql server 2005

object valueToConvert = "06.12.2008 13:45:17" //finnish independance day ; )
string strTime = System.Convert.ToString ( valueToConvert ).Trim ();
System.Diagnostics.Debug.WriteIf ( "The time string is " + strTime );
//Take into consideration the culture
CultureInfo culture = CultureInfo.CreateSpecificCulture ( "fi-FI" );
DateTime dtDate = DateTime.Parse ( strTime , culture );
System.Diagnostics.Debug.WriteIf ( "My dtDate.ToLongTimeString() is " + dtDate.ToLongTimeString () );
//Get the new vormat
valueToConvert = dtDate.ToLongTimeString() ;
System.Diagnostics.Debug.WriteIf ( "The datetime time " + dtDate.ToLongTimeString ());

//FOR SHORT DATE FORMAT

string strTime = System.Convert.ToString ( valueToConvert ).Trim();
System.Diagnostics.Debug.WriteIf ( "The time string is " + strTime );
//Old Data Format
CultureInfo culture = CultureInfo.CreateSpecificCulture("fi-FI");
DateTime dtDate = DateTime.Parse ( strTime , culture );
System.Diagnostics.Debug.WriteIf ( "My dtDate.ToString() is " + dtDate.ToShortDateString () );
//New Data Format
valueToConvert = dtDate.ToShortDateString () ;
System.Diagnostics.Debug.WriteIf ( "The smalldate time is dd.mm.yyyy" + dtDate.ToString ( "dd.mm.yyyy" ) );

how-to get meta data from a table in sql server 2005

SELECT c.name AS [COLUMN_NAME], sc.data_type AS [DATA_TYPE], [value] AS
[DESCRIPTION] , c.max_length as [MAX_LENGTH] , c.is_nullable AS [OPTIONAL]
, c.is_identity AS [IS_PRIMARY_KEY] FROM sys.extended_properties AS ep
INNER JOIN sys.tables AS t ON ep.major_id = t.object_id
INNER JOIN sys.columns AS c ON ep.major_id = c.object_id AND ep.minor_id
= c.column_id
INNER JOIN INFORMATION_SCHEMA.COLUMNS sc ON t.name = sc.table_name and
c.name = sc.column_name
WHERE class = 1 and t.name = 'PutHereYourTableName' ORDER BY SC.DATA_TYPE

2008-05-18

how-to list system objects from sql server 2005

use POC
--HOW-TO LIST ALL PROCEDURE IN A DATABASE
select s.name from sysobjects s where type = 'P'
--HOW-TO LIST ALL TRIGGERS BY NAME IN A DATABASE
select s.name from sysobjects s where type = 'TR'
--HOW-TO LIST TABLES IN A DATABASE
select s.name from sysobjects s where type = 'U'
--how-to list all system tables in a database
select s.name from sysobjects s where type = 's'
--how-to list all the views in a database
select s.name from sysobjects s where type = 'v'

/*
Similarly you can find out other objects created by user, simple change type =

C = CHECK constraint

D = Default or DEFAULT constraint

F = FOREIGN KEY constraint

L = Log

FN = Scalar function

IF = In-lined table-function

P = Stored procedure

PK = PRIMARY KEY constraint (type is K)

RF = Replication filter stored procedure

S = System table

TF = Table function

TR = Trigger

U = User table ( this is the one I discussed above in the example)

UQ = UNIQUE constraint (type is K)

V = View

X = Extended stored procedure
*/

2008-05-16

how-to write Singleton class in C# , asp.net

A great post about rounding corners applicable for dynamic controls
using System.Collections.Generic;


namespace BL
{
//hop_conf
public class Conf
{

#region Singleton Instantiation
Conf () { RegisterVariables (); }
public static Conf Instance
{
get { return Singleton.instance; }
}
class Singleton
{
static Singleton () { }
internal static readonly Conf instance =
new Conf ();
}
#endregion
private IDictionary _innerHash = new Dictionary ();
public IDictionary Vars
{
get { return _innerHash; }
}


private void RegisterVariables ()
{
_innerHash.Add ( "varName" , "theVarName" );
_innerHash.Add ( "appName" , "theAppName" );
_innerHash.Add ( "appNameLong" , "theAppNameLong" );

} //eof method RegisterVariables



} //eof class Conf

} //eof namespace

//how-to access conf variables BL.Conf.Instance.Vars [ "varName" ] would give you "theVarName

2008-05-14

how-to hide a column in gridview

//how-to hide columns from GridView -
//add (OnRowCreated="OnRowCreated") in your gridview declarative syntax
//in this example the second column is hidden
//add also to the css file of the aspx page ( .hiddencol {display:none;} )
protected void OnRowCreated(object sender, GridViewRowEventArgs e)
{

if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[1].CssClass = "hiddencol";
}
else if (e.Row.RowType == DataControlRowType.Header)
{
e.Row.Cells[1].CssClass = "hiddencol";
}
} //eof method OnRowCreated ( object sender, GridViewRowEventArgs e )

2008-05-09

How-to debug web pages efficienty with C#

//call Utils.Debugger.DebugPage ( this.Page );
public static void DebugPage ( System.Web.UI.Page page )
{

WriteIf ( "System.IO.Path.GetFileName ( System.Web.HttpContext.Current.Request.Url.AbsolutePath ) -- " +
System.IO.Path.GetFileName ( System.Web.HttpContext.Current.Request.Url.AbsolutePath ) );
WriteIf ( "System.Web.HttpContext.Current.Request.Url.AbsolutePath -- " +
System.Web.HttpContext.Current.Request.Url.AbsolutePath );
WriteIf ( "System.Web.HttpContext.Current.Request.Url.AbsoluteUri -- " +
System.Web.HttpContext.Current.Request.Url.AbsoluteUri );
WriteIf ( "System.Web.HttpContext.Current.Request.Url.DnsSafeHost -- " +
System.Web.HttpContext.Current.Request.Url.DnsSafeHost );
WriteIf ( "System.Web.HttpContext.Current.Request.Url.Fragment -- " +
System.Web.HttpContext.Current.Request.Url.Fragment );
WriteIf ( "System.Web.HttpContext.Current.Request.Url.Host -- " +
System.Web.HttpContext.Current.Request.Url.Host ) ;
WriteIf ( "System.Web.HttpContext.Current.Request.Url.HostNameType -- " +
System.Web.HttpContext.Current.Request.Url.HostNameType ) ;
WriteIf ( "System.Web.HttpContext.Current.Request.Url.LocalPath -- " +
System.Web.HttpContext.Current.Request.Url.LocalPath ) ;
WriteIf ( "System.Web.HttpContext.Current.Request.Url.OriginalString -- " +
System.Web.HttpContext.Current.Request.Url.OriginalString ) ;
WriteIf ( "System.Web.HttpContext.Current.Request.Url.PathAndQuery -- " +
System.Web.HttpContext.Current.Request.Url.PathAndQuery ) ;
WriteIf ( "System.Web.HttpContext.Current.Request.Url.Scheme -- " +
System.Web.HttpContext.Current.Request.Url.Scheme ) ;
WriteIf ( "System.Web.HttpContext.Current.Request.Url.Segments.ToString () -- " +
System.Web.HttpContext.Current.Request.Url.Segments.ToString () );
WriteIf ( "System.Web.HttpContext.Current.Request.Url.UserInfo -- " +
System.Web.HttpContext.Current.Request.Url.UserInfo );

} //eof DebugPage

HOW-TO Close all the windows from the taskbar on Windows Xp or Vista

::PUT THIS TEXT INTO A BATCH FILE WITH FILE EXTENSION CMD OR BAT
::IF YOU DON'T KNOW HOW DON'T PLAY WITH THIS ;) ...
@ECHO OFF

ECHO CLOSING ALL THE WINDOWS EXCEPT THIS ONE ARE YOU SURE ??!!
ECHO.
ECHO HIT ENTER TO PROCEED WITH CLOSING , CTRL + C TO CANCEL
ECHO.
ECHO THIS BATCH FILE REQUIRES THE CMDOW COMMAND LINE UTILITY
ECHO DOWNLOAD IT FROM http://www.commandline.co.uk/cmdow/

ECHO PLACE THIS FILE IN YOUR PATH , CREATE SHORTCUT TO IT
ECHO PUT THE SHORTCUT ON THE DESKTOP , RIGHT CLICK , ASSIGN SHORTCUT TO IT ...

PAUSE

for /f %%l in ('cmdow @') do set c=%%l
for /f %%i in ('cmdow /b /t') do if not %%i==%c% cmdow %%i /END

::ENABLE THIS LINE BY REMOVING THE :: IN FRONT IF THE TASKBAR DISAPPEARS
::cmd /c explorer.exe

::ENABLE THIS LINE BY REMOVING THE :: IN FRONT IF YOU WOULD LIKE TO SHUTDOWN YOUR PC
::shutdown -f -s -t 00

2008-05-02

how-to implement memory efficient asp.net C# application

SOURCES:
http://aspalliance.com/520_Detecting_ASPNET_Session_Timeouts.2
Base Page and User Control Classes

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

public class CustomBasePage : System.Web.UI.Page
{
public CustomBasePage ()
{
}

override protected void OnInit ( EventArgs e )
{
ClearAllNonGlobalSessionsButMine ();
}
private void ClearAllNonGlobalSessionsButMine( )
{
string fileNameNoExt = System.IO.Path.GetFileNameWithoutExtension (
System.Web.HttpContext.Current.Request.Url.AbsolutePath );

for (int i = 0 ; i< HttpContext.Current.Session.Count ;i ++ )
{
string keyValue = HttpContext.Current.Session.Keys [ i ];
if (keyValue.Contains ( fileNameNoExt ) || keyValue.Contains ( "global" ))
{ ; } //do nothing = preserve the value in the session
else
{
Utils.Debugger.WriteIf ( "Deleting ---- " + HttpContext.Current.Session [ HttpContext.Current.Session.Keys [ i ] ] );
HttpContext.Current.Session [ HttpContext.Current.Session.Keys [ i ] ] = null;
} //eof else if it is global or belongs to current page


} //eof loop

} //eof public static void ClearAllButCurrent (string pageName )

} //eof BasePageClass

how-to get the file name requested without the extension in asp.net and C#

Utils.Debugger.WriteIf ( "My page name without extension is " +
System.IO.Path.GetFileNameWithoutExtension (
System.Web.HttpContext.Current.Request.Url.AbsolutePath ) );

2008-05-01

Is Fusion feasible (soon) ?

Some clame yes
http://www.news.com/8301-11128_3-9866626-54.html
http://www.generalfusion.com/t5_general_fusion.php


I would not put more than 5% of my savings on it ... so far ... yet the guys have vary good technical explanations ... and are open and brave enough to show them to the world ...

Anyway I did not buy any stocks but donateted
here:

why:
whell ...
find out

how-to howto convert pdf files to html files with freeware

1. How to use it on a single file:
- download the tool , put it into your "path" (path might be C:\Windows\ or C:\winnt
- Start - Run - type cmd
- navigate to the folder where you have the file - e.g. cd C:\Temp
- paste (Alt + E, P) the following code
:: =======================COPYPASTE START
pdf2html -noframes -c -p "the Name of the File" "The Name Of the File.html"
:: =======================COPYPASTE END

2. On many files - If you have a bunch of those files to convert to pdf, place them on a single folder
- navigate to the folder containig the files
- copy paste the following code (Alt + E , P)

:: =======================COPYPASTE START
::move each separate document in its own folder
for /f "tokens=*" %%i in ('dir *.pdf /s /b /a-d') do mkdir "%%i_folder"&
move /y "%%i" "%%i_folder"
::pause
:: generate html out of pdf
for /f "tokens=*" %%i in ('dir *.pdf /s /b /a-d') do pdf2html -noframes -c
-p "%%i" "%%i.html"
::pause

:: =======================COPYPASTE END

C# asp.net coding usefull tips

Use proper naming conventions - in a large project you will end up with more than thousand variable names , methods , etc.
So in order to facilitate the autocompletion feature fully name as follows:
- the names of the variables - if it is control , find out consisten 3 letter abbreviation for type of control and than the name - for example - if I have a column name in the database called FirstName - the name of the textbox , which will pass the value to the db is txtFirstName, if it is label is should be labFirstName , if I have panel containing controls the name of the panel is panSearch. Thus each time you remember - it is a text field you just type txt and will get list (hopefully smaller than 20 items in your page / class with all the txt fields ; )
- the names of the methods - well Microsoft advices use for example SearchClick - I say use ClickSearch - once you type Click you will get all the EventHandlers which you have designed to response to click on a button , or CheckUserIsActivie

- Use longer names of classes to remember them better - later one use find and replace LongNameOfClass. with lnc once you have used the class so often that you remember the short name for sure - the same stands for variables

- use short name for variables , which are obvious from the context - e.g. later on when having to debug or just simply review what the ... I have written ... it will be 100% sure what this variable stands for . For example:
public static void SanitizeForSQL ( ref string s , char c )
{
s = c + s + c ;
}

The main configuration files in Linux and their meaning

SOURCES:
THE ONE PAGE LINUX MANUAL


/etc/profile System wide environment variables for
all users.
/etc/fstab List of devices and their associated mount
points. Edit this file to add cdroms, DOS
partitions and floppy drives at startup.
/etc/motd Message of the day broadcast to all users
at login.
etc/rc.d/rc.local Bash script that is executed at the end of
login process. Similar to autoexec.bat in
DOS.
/etc/HOSTNAME Conatins full hostname including domain.
/etc/cron.* There are 4 directories that automatically
execute all scripts within the directory at
intervals of hour, day, week or month.
/etc/hosts A list of all know host names and IP
addresses on the machine.
/etc/httpd/conf Paramters for the Apache web server
/etc/inittab Specifies the run level that the machine
should boot into.
/etc/resolv.conf Defines IP addresses of DNS servers.
/etc/smb.conf Config file for the SAMBA server. Allows
file and print sharing with Microsoft
clients.
/etc/X11/XF86Confi
g
Config file for X-Windows.
~/.xinitrc Defines the windows manager loaded by
X. ~ refers to user’s home directory.

Labels

perl (41) Cheat Sheet (25) how-to (24) windows (14) sql server 2008 (13) linux (12) oracle (12) sql (12) Unix (11) cmd windows batch (10) mssql (10) cmd (9) script (9) textpad (9) netezza (8) sql server 2005 (8) cygwin (7) meta data mssql (7) metadata (7) bash (6) code generation (6) Informatica (5) cheatsheet (5) energy (5) tsql (5) utilities (5) excel (4) future (4) generic (4) html (4) perl modules (4) programs (4) settings (4) sh (4) shortcuts (4) поуки (4) принципи (4) Focus Fusion (3) Solaris (3) cool programs (3) development (3) economy (3) example (3) freeware (3) fusion (3) git cheat sheet (3) logging (3) morphus (3) mssql 2005 (3) nuclear (3) nz (3) parse (3) python (3) sftp (3) sofware development (3) source (3) sqlplus (3) table (3) vim (3) .Net (2) C# (2) China (2) GUI (2) Google (2) GoogleCL (2) Solaris Unix (2) ascii (2) awk (2) batch (2) cas (2) chrome extensions (2) code2html (2) columns (2) configuration (2) conversion (2) duplicates (2) excel shortcuts (2) export (2) file (2) free programs (2) informatica sql repository (2) linux cheat sheet (2) mssql 2008 (2) mysql (2) next big future (2) nsis (2) nz netezza cheat sheet (2) nzsql (2) ora (2) prediction (2) publish (2) release management (2) report (2) security (2) single-click (2) sqlserver 2005 (2) sqlserver 2008 (2) src (2) ssh (2) template (2) tools (2) vba (2) video (2) xlt (2) xml (2) youtube videos (2) *nix (1) .vimrc (1) .virmrc vim settings configs (1) BSD license (1) Bulgaria (1) Dallas (1) Database role (1) Dense plasma focus (1) Deployment (1) ERP (1) ExcelToHtml (1) GD (1) GDP (1) HP-UX (1) Hosting (1) INC (1) IT general (1) ITIL management bullshit-management (1) IZarc (1) Java Web Start (1) JavaScript anchor html jquery (1) Khan Academy (1) LINUX UNIX BASH AND CYGWIN TIPS AND TRICKS (1) Linux Unix rpm cpio build install configure (1) Linux git source build .configure make (1) ListBox (1) MIT HYDROGEN VIRUS (1) OO (1) Obama (1) PowerShell (1) Run-time (1) SDL (1) SIWA (1) SOX (1) Scala (1) Services (1) Stacks (1) SubSonic (1) TED (1) abstractions (1) ansible hosts linux bash (1) ansible linux deployment how-to (1) ansible yum pip python (1) apache (1) apache 2.2 (1) application life cycle (1) architecture (1) archive (1) arguments (1) avatar (1) aws cheat sheet cli (1) aws cli (1) aws cli amazon cheat sheet (1) aws elb (1) backup (1) bash Linux open-ssh ssh ssh_server ssh_client public-private key authentication (1) bash perl search and replace (1) bash stub (1) bin (1) biofuels (1) biology (1) books (1) browser (1) bubblesort (1) bugs (1) build (1) byte (1) cas_sql_dev (1) chennai (1) chrome (1) class (1) claut (1) cmdow (1) code generation sqlserver (1) command (1) command line (1) conf (1) confluence (1) console (1) convert (1) cool programs windows free freeware (1) copy-paste (1) csv (1) ctags (1) current local time (1) cygwin X11 port-forwarding mintty xclock Linux Unix X (1) cygwin bash how-to tips_n_tricks (1) cygwin conf how-to (1) data (1) data types (1) db2 cheat sheet (1) db2 starter ibm bash Linux (1) debt (1) diagram (1) dictionaries (1) digital (1) disk (1) disk space (1) documentation (1) dos (1) dubai (1) e-cars (1) electric cars (1) electricity (1) emulate (1) errors (1) exponents (1) export workflow (1) extract (1) fast export (1) fexp (1) file extension (1) file permissions (1) findtag (1) firewall (1) for loop (1) freaky (1) functions (1) fusion research (1) german (1) git gitlab issues handling system (1) google cli (1) google code (1) google command line interface (1) gpg (1) ha (1) head (1) helsinki (1) history (1) hop or flop (1) host-independant (1) how-to Windows cmd time date datetime (1) ibm db2 cognos installation example db deployment provisioning (1) ideas (1) image (1) informatica oracle sql (1) informatica repo sql workflows sessions file source dir (1) informatica source files etl (1) install (1) isg-pub issue-tracker architecture (1) it management best practices (1) java (1) jump to (1) keyboard shortcuts (1) ksh (1) level (1) linkedin (1) linux bash ansible hosts (1) linux bash commands (1) linux bash how-to shell expansion (1) linux bash shell grep xargs (1) linux bash tips and t ricks (1) linux bash unix cygwin cheatsheet (1) linux bash user accounts password (1) linux bash xargs space (1) linux cheat-sheet (1) linux cheatsheet cheat-sheet revised how-to (1) linux how-to non-root vim (1) linux ssh hosts parallel subshell bash oneliner (1) london (1) make (1) me (1) metacolumn (1) metadata functions (1) metaphonre (1) method (1) model (1) movie (1) multithreaded (1) mysql cheat sheet (1) mysql how-to table datatypes (1) n900 (1) nano (1) neteza (1) netezza bash linux nps (1) netezza nps (1) netezza nps nzsql (1) netezza nz Linux bash (1) netezza nz bash linux (1) netezza nz nzsql sql (1) netezza nzsql database db sizes (1) non-password (1) nord pol (1) nps backup nzsql schema (1) number formatting (1) nz db size (1) nz table count rows (1) nzsql date timestamp compare bigint to_date to_char now (1) on-lier (1) one-liners (1) one-to-many (1) oneliners (1) open (1) open source (1) openrowset (1) openssl (1) oracle PL/SQL (1) oracle Perl perl (1) oracle installation usability (1) oracle number formatting format-model ora-sql oracle (1) oracle templates create table (1) oracle trigger generic autoincrement (1) oracle vbox virtual box cheat sheet (1) oracle virtual box cheat sheet (1) outlook (1) parser (1) password (1) paths (1) perl @INC compile-time run-time (1) perl disk usage administration Linux Unix (1) perl modules configuration management (1) permissions (1) php (1) picasa (1) platform (1) postgreSQL how-to (1) powerShell cmd cygwin mintty.exe terminal (1) ppm (1) predictions (1) prices (1) principles (1) productivity (1) project (1) prompt (1) proxy account (1) public private key (1) publishing (1) putty (1) qt (1) read file (1) registry (1) relationship (1) repository (1) rm (1) scala ScalaFmt (1) scp (1) scripts (1) scsi (1) search and replace (1) sed (1) sendEmail (1) sh stub (1) shortcuts Windows sql developer Oracle (1) sidebar (1) silicon (1) smtp (1) software procurement (1) sofware (1) sort (1) sql script (1) sql_dev (1) sqlcmd (1) sqlite (1) sqlite3 (1) sshd (1) sshd cygwin (1) stackoverflow (1) stored procedure (1) stub (1) stupidity (1) subroutines (1) svn (1) sysinternals (1) tail (1) tar (1) temp table (1) templates (1) teradata (1) terminal (1) test (1) testing (1) theory (1) thorium (1) time (1) tip (1) title (1) tmux .tmux.conf configuration (1) tmux efficiency bash (1) tool (1) ui code prototyping tips and tricks (1) umask Linux Unix bash file permissions chmod (1) url (1) urls (1) user (1) utility (1) utils (1) vb (1) vbox virtual box cheat sheet (1) vim perl regex bash search for string (1) vim recursively hacks (1) vim starter (1) vim-cheat-sheet vim cheat-sheet (1) vimeo (1) visual stuio (1) warsaw (1) wiki (1) wikipedia (1) window (1) windows 7 (1) windows 8 (1) windows programs (1) windows reinstall (1) windows utility batch perl space Windows::Clipboard (1) wisdoms (1) workflow (1) worth-reading (1) wrapper (1) xp_cmdshell (1) xslt (1) youtube (1)

Blog Archive

Translate with Google Translate

My Blog List

VideoBar

This content is not yet available over encrypted connections.