April 2006


PHP Code21 Apr 2006 07:00 pm

Using php to create or touch a file, first checks to see if it already exists.

CODE:
  1. <?php
  2. //set the filename or passed from form argument
  3. $filename = "/path/filenane.ext";
  4. //does the file exist?
  5. if (!file_exists($filename)) {
  6. //create the filename
  7.         touch($filename);
  8. //set permissions
  9.         chmod($filename,666);
  10. }
  11. ?>

Blogging Resources21 Apr 2006 05:59 pm

Just testing a new code hi-lighter plugin before posting any more complex code snippets.

CODE:
  1. <?php
  2. echo $filename ;
  3. ?>

Finally found one that actually handles the code funtion properly with WP 2.0.2! The iG:Syntax Hiliter works flawlessly :)

Geeky Stuff& Linux / Unix21 Apr 2006 12:10 pm

Because I can never seem to be able to remember them... too spoiled with other editors like pico and nano.

Starting an Editing Session

vi filename

where filename is the name of the file to be edited.

Undo Command

u
undo the last command.

Screen Commands

CTL/l
Reprints current screen.
CTL/L
Exposes one more line at top of screen.
CTL/E
Exposes one more line at bottom of screen.
CTL/F
Pages forward one screen.
CTL/B
Pages back one screen.
CTL/D
Pages down half screen.
CTL/U
Pages up half screen.

Cursor Positioning Commands

j
Moves cursor down one line, same column.
k
Moves cursor up one line, same column.
h
Moves cursor back one character.
l
Moves cursor forward one character.
RET
Moves cursor to beginning of next line.
0
Moves cursor to beginning of current line.
$
Moves cursor to end of current line.
SPACE
Moves cursor forward one character.
nG
Moves cursor to beginning of line n. Default is last line of file.
0
Moves the cursor to the first character of the line.
:n
Moves cursor to beginning of line n.
b
Moves the cursor backward to the beginning of the previous word.
e
Moves the cursor backward to the end of the previous word.
w
Moves the cursor forward to the next word.  

/pattern
Moves cursor forward to next occurrence of pattern.
?pattern
Moves cursor backward to next occurrence of pattern.
n
Repeats last / or ? pattern search.  

Text Insertion Commands

a
Appends text after cursor. Terminated by escape key.
A
Appends text at the end of the line. Terminated the escape key.
i
Inserts text before cursor. Terminated by the escape key.
I
Inserts text at the beginning of the line. Terminated by the escape key.
o
Opens new line below the current line for text insertion. Terminated by the escape key.
O
Opens new line above the current line for text insertion. Terminated by the escape key.
DEL
Overwrites last character during text insertion.
ESC
Stops text insertion. The escape key on the DECstations is the F11 key.  

Text Deletion Commands

x
Deletes current character.
dd
Deletes current line.
dw
Deletes the current word.
d)
Deletes the rest of the current sentence.
D, d$
Deletes from cursor to end of line.
P
Puts back text from the previous delete.  

Changing Commands

cw
Changes characters of current word until stopped with escape key.
c$
Changes text up to the end of the line.
C, cc
Changes remaining text on current line until stopped by pressing the escape key.  

~
Changes case of current character.
xp
Transposes current and following characters.
J
Joins current line with next line.
s
Deletes the current character and goes into the insertion mode.
rx
Replaces current character with x.
R
Replaces the following characters until terminated with the escape key.  

Cut and Paste Commands

yy
Puts the current line in a buffer. Does not delete the line from its current position.
p
Places the line in the buffer after the current position of the cursor.  

Appending Files into Current File

:R filename
Inserts the file filename where the cursor was before the ``:'' was typed.

Exiting vi

ZZ
Exits vi and saves changes.
:wq
Writes changes to current file and quits edit session.
:q!
Quits edit session (no changes made).
Webmaster / SEO& vBulletin20 Apr 2006 07:49 am

While surfing around I found yet another great resource for vBulletin, great folks with lots of good ideas, and a lot of expertise.

Take a look at vbulletin-faq.com Tell'm dakar referred you :)

General03 Apr 2006 01:49 am

Cronicles of my adventures trying to get Windows Xp Pro X64 running and integrated periphials workong on my Acer Aspire 5003 WLCI laptop.

 First stumbling block - integrated wifi card... by default it's not recognized - 64bit drivers needed - 80211g.zip

SiSM760GX integrated 3D graphics controller with 64MB shared RAM - X64 drivers - agp121.zip

« Previous PageNext Page »


Debt Consolidation - Loans - Homeowner Loans - Debt Consolidation - Almudena grandes
X10 Home Security|Dakar's Photos
Listed on BlogShares