16 Linux Server Commands You Should Know

original source: 16 Linux Server Monitoring Commands You Really Need To Know

iostat

The iostat command shows in detail what your storage subsystem is up to. You usually use iostat to monitor how well your storage sub-systems are working in general and to spot slow input/output problems before your clients notice that the server is running slowly. Trust me, you want to spot these problems before your users do!

meminfo and free

Meminfo gives you a detailed list of what’s going on in memory. Typically you access meminfo’s data by using another program such as cat or grep. For example,

Read More

10 Papers Every Programmer Should Read

  1. On the criteria to be used in decomposing systems into modules – David Parnas
  2. A Note On Distributed Computing – Jim Waldo, Geoff Wyant, Ann Wollrath, Sam Kendall
  3. The Next 700 Programming Languages – P. J. Landin
  4. Can Programming Be Liberated from the von Neumann Style? – John Backus
  5. Reflections on Trusting Trust – Ken Thompson
  6. Lisp: Good News, Bad News, How to Win Big – Richard Gabriel
  7. An experimental evaluation of the assumption of independence in multiversion programming – John Knight and Nancy Leveson
  8. Arguments and Results – James Noble
  9. A Laboratory For Teaching Object-Oriented Thinking – Kent Beck, Ward Cunningham
  10. Programming as an Experience: the inspiration for Self – David Ungar, Randall B. Smith

via 10 Papers Every Programmer Should Read at Least Twice (blog.objectmentor.com)

Read More

Ssh Tricks

Some tricks covered in the article include:

  • using passwordless, key-based login;
  • setting up local per-host configurations;
  • exporting a local service through a firewall;
  • accessing a remote service through a firewall;
  • setting up a SOCKS proxy for Firefox;
  • executing commands remotely from scripts;
  • transfering files to/from remote machines;
  • mounting a filesystem through SSH; and
  • triggering admin scripts from a phone.
Full article: SSH Tricks (matt.might.net)
Read More

Understanding Javascript Oop

JavaScript is an object oriented (OO) language, with its roots in the Self programming language, although it’s (sadly) designed to look like Java. This makes the language’s really powerful and sweet features stay covered by some pretty ugly and counter-intuitive work-arounds.

Read More

How To Iterate Through A Result Set With Sql

Method 1: Using a cursor

declare cursor1 cursor local for select * from tablename
open cursor1
fetch next from cursor1 into #temptable
while @@fetch_status = 0
begin
if exists (select column from tablename where 
        id = (select id from #temptable))
    begin 
        /* do stuff here */ 
    end
else
    begin
        /* do other stuff here */
    end 
if object_id('tempdb..#temptable') is not null
        drop table #temptable
fetch next from cursor1 into #temptable
end
close cursor1
deallocate cursor1

Method 2: Using a temporary table with primary key         (via: http://support.microsoft.com/kb/111401)

declare @au_id char( 11 )
set rowcount 0
select * into #mytemp from authors
set rowcount 1
select @au_id = au_id from #mytemp
while @@rowcount <> 0
begin
    set rowcount 0
    select * from #mytemp where au_id = @au_id
    delete #mytemp where au_id = @au_id
    set rowcount 1
    select @au_id = au_id from #mytemp<BR/>
end
set rowcount 0

Method 3: Using a temporary table without primary key         (via: http://support.microsoft.com/kb/111401)

set rowcount 0
select NULL mykey, * into #mytemp from authors
set rowcount 1
update #mytemp set mykey = 1
while @@rowcount > 0
begin
    set rowcount 0
    select * from #mytemp where mykey = 1
    delete #mytemp where mykey = 1
    set rowcount 1
    update #mytemp set mykey = 1
end
set rowcount 0
Read More

How To Iterate Through A Result Set With Sql 2

Method 1: Using a cursor

declare cursor1 cursor local for select * from tablename
open cursor1
fetch next from cursor1 into #temptable
while @@fetch_status = 0
begin
if exists (select column from tablename where 
        id = (select id from #temptable))
    begin 
        /* do stuff here */ 
    end
else
    begin
        /* do other stuff here */
    end 
if object_id('tempdb..#temptable') is not null
        drop table #temptable
fetch next from cursor1 into #temptable
end
close cursor1
deallocate cursor1

Method 2: Using a temporary table with primary key         (via: http://support.microsoft.com/kb/111401)

declare @au_id char( 11 )
set rowcount 0
select * into #mytemp from authors
set rowcount 1
select @au_id = au_id from #mytemp
while @@rowcount <> 0
begin
    set rowcount 0
    select * from #mytemp where au_id = @au_id
    delete #mytemp where au_id = @au_id
    set rowcount 1
    select @au_id = au_id from #mytemp<BR/>
end
set rowcount 0

Method 3: Using a temporary table without primary key         (via: http://support.microsoft.com/kb/111401)

set rowcount 0
select NULL mykey, * into #mytemp from authors
set rowcount 1
update #mytemp set mykey = 1
while @@rowcount > 0
begin
    set rowcount 0
    select * from #mytemp where mykey = 1
    delete #mytemp where mykey = 1
    set rowcount 1
    update #mytemp set mykey = 1
end
set rowcount 0
Read More

The Development Of The C Language

The C programming language was devised in the early 1970s as a system implementation language for the nascent Unix operating system. Derived from the typeless language BCPL, it evolved a type structure; created on a tiny machine as a tool to improve a meager programming environment, it has become one of the dominant languages of today. This paper studies its evolution.

Read More

Tip How To Connect To A Database With Different Credentials In Sql Server Management Studio

If you are logged into your machine with a username that doesn’t have access to a certain SQL Server database you can launch SQL Server Management Studio with different credentials. This allows you to use Windows Authentication with a different username when connecting to the database server.

runas /user:DOMAIN\USERNAME "C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe"

 

Read More

What Every Programmer Should Know About Memory

“In the early days computers were much simpler. The various components of a system, such as the CPU, memory, mass storage, and network interfaces, were developed together and, as a result, were quite balanced in their performance. For example, the memory and network interfaces were not (much) faster than the CPU at providing data.

Read More