Difference between revisions of "Quick Notes"

From Secure Computing Wiki
Jump to: navigation, search
(Command Line Foo)
(Command Line Foo)
Line 15: Line 15:
 
* [[dump]]
 
* [[dump]]
 
* [[cu]]
 
* [[cu]]
 +
* [[sed]]
  
 
==iPhone Notes==
 
==iPhone Notes==

Revision as of 12:43, 13 February 2008

This page is to list all of those quick, often one-line, commands or hints that help during the course of system administration.

MediaWiki Notes

This section is for all the stuff you can do or need to do with Media Wiki that isn't found in an easy location.

Navigation/Side-Bar

You can edit the links under navigation, etc, on the left of the page by going to a special page in MediaWiki. <host>/wiki/index.php/MediaWiki:Sidebar will take you there. You can see the SCN side bar at MediaWiki:Sidebar.

Command Line Foo

iPhone Notes

Windows (Bleh) Notes

SpamAssassin

Postfix

http://www.freesoftwaremagazine.com/articles/secure_email_servers_from_scratch_with_freebsd_6_part_2

Postfix How-To

vMail.Admin

Link sudo to /usr/bin/sudo

# ln -s /usr/local/bin/sudo /usr/bin/sudo

Firefox

  • No Scroll Tabs: goto about:config, set browser.tabs.tabMinWidth=1
  • Close on Tab: goto about:config, set browser.tabs.closeButtons=1

MySQL Stuff

Command/Query Examples

Description Command Notes
Forcibly change a user's password. SET PASSWORD FOR user=PASSWORD('password');
Add New Database User GRANT ALL PRIVILEGES ON db.table to 'user'@'host' IDENTIFIED BY 'password'; You can use a % to denote ANY host. The percent (%) purposely excludes localhost, however.
Copy rows from one table to another. INSERT INTO foo SELECT * FROM bar; copies records from table bar into table foo.
action based on time interval SELECT FROM foo WHERE DATE(field) < (YYYYMMDD - INTERVAL nnn unit) Where unit = DAY/YEAR/MONTH - one of those, will select based on records older than the interval.
Flush all queries from the cache. FLUSH QUERY CACHE

Links

Apple Remote Desktop 3.1

This is just a place-holder.

GNU Screen

  • A nice .screenrc config file:

startup_message off
vbell off
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

PHP

Function Code Example Description
foreach foreach ($array as $key => $value) { code }