Bir kaynak kodunun tamamini yada bir kismini dokumante ederken yada bir web alaninda yayinlarken renklendirme ihtiyaci duyulmaktadir. Hatta bunun icin farkli cozumlar de vardir. Linux komut satirinda bu amac icin highlight uygulamasi kullani;maktadir.
Bu uygulama yazmis oldugunuz bir kaynak kodunu, HTML, XHTML, RTF, ODT,LaTeX, TeX, BBCode gibi formatlara renklendirerek donusturme yapabilmektedir. Ancak bu uygulama input olarak sadece C, C++, C# ve Java dosyalarini desteklemektedir.
Kodu renklendirerek bir word dokumani icinde renklendirerek yapistirmak icin ornek olarak asagidaki yontemler kullanilabilir.
html dokuman olusturmak icin;
highlight -i main.cpp -o main.cpp.html
yukarida olusan html dokumanda bir tane html dokuman ve css dosyalari
olusturuluyor.olusan css dosyasini html icine gommek icin
highlight -i main.cpp -o main.cpp.html --include-style --line-numbers
Kodu latex dokumaninda kullanmak icin
highlight --syntax ada --out-format=latex --font-size tiny --font sffamily
Tuesday, June 30, 2015
Saturday, June 6, 2015
Apache2 URL Restriction
URL olarak bir url i httpd.conf ta bloklamak istiyorsak <Directory > yerine <Location > diyormuşuz.
<Directory /admin>
order deny,allow
Allow from 10.50.50.0/24
deny from all
</Directory>
<Location /index.php/admin>
order deny,allow
deny from all
Allow from 10.50.50.0/24
</Location>
<Directory /admin>
order deny,allow
Allow from 10.50.50.0/24
deny from all
</Directory>
<Location /index.php/admin>
order deny,allow
deny from all
Allow from 10.50.50.0/24
</Location>
Subscribe to:
Posts (Atom)