Admin

You are currently browsing the articles from KomKid.Net matching the category Admin.

GeSHi Language Aliases

ทั้ง phpBB ของที่ทำงานและ wordpress ของที่นี่ ต่างก็ใช้ Syntax Hilight ของ GeSHi
โดย phpBB เป็น phpBB3.0.5 ติดตั้ง mod bbGeSHi 0.7.5
และ wordpress ใช้ plugin wp-syntax.0.9.8
เวลาใช้มักจะลืมตัวย่อของภาษาอยู่เรื่อย ก็เลยต้อง list ไว้กันลืมซะหน่อย
ABAP – abap
Actionscript – actionscript
ADA – ada
Apache Log – apache
AppleScript – applescript
APT sources.list
ASM (m68k) – asm
ASM (pic16) – asm
ASM (x86) – asm
ASM (z80) – asm
ASP – asp
AutoIT – autoit
Backus-Naur form
Bash – bash
Basic4GL
BlitzBasic – blitzbasic
Brainfuck – bnf
C – c
C for Macs – c_mac
C# – cpp
C++ – csharp
C++ (with QT) – cpp-qt
CAD DCL – caddcl
CadLisp – cadlisp
CFDG – cfdg
CIL / MSIL
COBOL
ColdFusion – cfm
CSS – css
D – d
Delphi – delphi
Diff File Format – diff
DIV – div
DOS – dos
DOT language – dot
Eiffel – eiffel
Fortran – fortran
FourJ’s Genero – genero
FreeBasic – freebasic
GetText
glSlang
GML – gml
gnuplot
Groovy – groovy
Haskell – haskell
HQ9+
HTML – html, html4strict
INI (Config Files) – ini
Inno – inno
INTERCAL
IO – io
Java – java
Java 5 – java5
Javascript – javascript, js
KiXtart
KLone C & C++
LaTeX – latex
Lisp – lisp
LOLcode
LotusScript
LScript
Lua – lua
Make – m68k
mIRC – mirc
MXML
MySQL – mysql
NSIS – nsis
Objective C – objc
OCaml – Ocaml-brief, ocaml
OpenOffice BASIC – oobas
Oracle 8 & 11 SQL – oracle8
Pascal – pascal
Perl – perl
PHP – Php-brief, php
Pixel Bender
PL/SQL – plsql
POV-Ray
PowerShell
Progress (OpenEdge ABL)
Prolog
ProvideX
Python – python
Q(uick)BASIC – qbasic
robots.txt – robots
Ruby – ruby
Ruby on Rails – rails
SAS – sas
Scala
Scheme – scheme
Scilab
SDLBasic – sdlbasic
Smalltalk – smalltalk
Smarty – smarty
SQL – sql
T-SQL – tsql
TCL – tcl
thinBasic – thinbasic
TypoScript
Uno IDL
VB.NET – vbnet
Verilog
VHDL – vhdl
VIM Script
Visual BASIC – vb
Visual Fox Pro – visualfoxpro
Visual Prolog
Whitespace
Winbatch – winbatch
Windows Registry Files – reg
X++ – xpp (มี X++ ของ Axapta ด้วย)
XML – xml, xsl
Xorg.conf

Written by Komkid on October 4th, 2009 with no comments.
Read more articles on Admin and Internet.

Determing SQL Server Database and Table Size

Example 1 (SQL Server table)

Run the following SQL statement from Teratrax Database Manager, Query Analyzer, or SQL Server Management Studio. Replace the names in bold with your own:

USE db1
GO
EXEC sp_spaceused N'dbo.orders'
GO

Results
* name: Table name for which space usage information was requested
* rows: Number of rows existing in the table
* reserved: Total amount of reserved space for table data and indexes
* data: Amount of space used by table data
* index_size: Amount of space used by table indexes
* unused: Total amount of space reserved for table but no yet used

Example 2 (SQL Server database)

You can also run sp_spaceused without any parameters to display information about the whole database. Replace the names in bold with your own:

USE db1
GO
EXEC sp_spaceused
GO

Results
First Recordset:
* database_name: Name of the current database
* database_size: Size of the current database in megabytes. database_size includes both data and log files
* unallocated space: Space in the database that has not been reserved for database objects

Second Recordset:
* reserved: Total amount of space allocated by objects in the database
* data: Total amount of space used by data
* index_size: Total amount of space used by indexes
* unused: Total amount of space reserved for objects in the database, but not yet used

From : http://www.teratrax.com/articles/table_size_sp_spaceused.html

Written by Komkid on September 1st, 2009 with no comments.
Read more articles on Admin and Database.

Delete Domain Controller using ntdsutil.exe

1.ntdsutil
2.metada cleanup
3.connections
4.connect to server
5.quit
6.select operation target
7.list domains
8.select domain
9.list sites
10.select site
11.list servers in site
12.select server
13.quit
14.remove selected server
15.quit
16.quit

Written by Komkid on August 28th, 2009 with no comments.
Read more articles on Admin and Networking.

How To Setup Multiple Virtual Hosts In Apache

กรณีต้องการให้เครื่อง localhost เครื่องเดียว เรียกได้หลาย domain ทำได้ดังนี้
1.ตั้งค่า virtualhost ใน apache ที่ไฟล์ /etc/apache2/https.conf

1
2
3
4
5
6
7
8
9
NameVirtualHost 127.0.0.1:80
< VirtualHost 127.0.0.1:80 >
   ServerName test.sci.com
   DocumentRoot "/var/www/test"
< /VirtualHost >
< VirtualHost 127.0.0.1:80 >
   ServerName cc.sci.com
   DocumentRoot "/var/www/cc"
< /VirtualHost >

2.แก้ไขไฟล์ /etc/hosts เพื่อให้เรียกใช้ตามชื่อ ที่ ตั้งไว้ในข้อ 1

127.0.0.1 test.sci.com
127.0.0.1 cc.sci.com

นอกจากนี้ก็มีตัวอย่างอีกหลายแบบ ดูได้ที่
http://httpd.apache.org/docs/2.0/vhosts/examples.html

Written by Komkid on August 10th, 2009 with no comments.
Read more articles on Admin.

phpbb3 cookie setting

สมมุติว่า url ของ board คือ http://cc.sci.com
ต้องตั้งค่า Cookie กับ Server ในหน้า admin ดังรูป
phpbb3_cookie_setting

phpbb3_server_setting

หรือใช้คำสั่ง SQL ตรง ๆ ดังนี้

1
2
3
4
5
6
7
8
9
UPDATE `phpbb_config` SET `config_value` = 'cc.sci.com' WHERE config_name = 'cookie_domain';
UPDATE `phpbb_config` SET `config_value` = 'phpbb3_pxstg' WHERE config_name = 'cookie_name';
UPDATE `phpbb_config` SET `config_value` = '/' WHERE config_name = 'cookie_path';
UPDATE `phpbb_config` SET `config_value` = '0' WHERE config_name = 'cookie_secure';

UPDATE `phpbb_config` SET `config_value` = '/' WHERE config_name = 'script_path'; //ตั้งค่า virtualhost ไว้แล้วเลยไม่ต้องใส่ path อีก
UPDATE `phpbb_config` SET `config_value` = 'cc.sci.com' WHERE config_name = 'server_name';
UPDATE `phpbb_config` SET `config_value` = '80' WHERE config_name = 'server_port';
UPDATE `phpbb_config` SET `config_value` = 'http://' WHERE config_name = 'server_protocol';

Written by Komkid on August 10th, 2009 with no comments.
Read more articles on Admin.

« Older articles

Newer articles »