Protected: Itungan Karo Mammoth
Permalink Enter your password to view comments.
#include
#include
#include
#define DISPLAY 80
#define PAGE_LENGTH 20
int main(int argc, char *argv[])
{
char filename[80]=“c:\\myfile.txt”;
FILE *pfile;
unsigned char buffer[DISPLAY/4 - 1];
int count = 0;
int lines = 0;
int i = 0;
if((pfile = fopen(filename, “rb”)) == NULL){
printf(“Sorry, can’t open %s”, filename);
return -1;
}
while(!feof(pfile))
{
if(count < sizeof buffer) /* If the buffer is not full */
printf(“%c \n”, (unsigned char)fgetc(pfile));
if(count < sizeof buffer) /* If the buffer is not full */
printf(“%02X \n”, (unsigned char)fgetc(pfile));
}
fclose(pfile);
return 0;
}
Yang ini dasar banget…. Langsung saja ya
Server# tar czf coba1.tar.gz files1 files2 dsb
Permalink Enter your password to view comments.
1. tulisan portofolio iku di ganti PORTFOLIO ya
2. logo bocah bagus e Durung Ono
3. Link Yahoo Mesengeer… Tambah 2 Aliasing.
4. info email bocahbagus.com
5. Ponggeng –> email e ?
6. Perlu Tambahan sedikit grafis supaya kesan minimalis artistiknya lbh dapet?
7. http://www.bocahbagus.com/node/1 –> content-nya tolong Diubah..(tunggu dari Owner)
8. Header Slides …minta sewaktu waktu bisa diganti…caranya bagaimana ?
9. Tambah Counter Pengunjung.
10. Testimoni yang tampil hanya yang di approve oleh Owner….
11. di portfolio iku aku iso up load foto di folder2 nya ya..aku nambahi folder e, iso ra bos?
[error] [client XXX.XXX.XXX.XXX] PHP Fatal error: Allowed memory size > of 16777216 bytes exhausted (tried to allocate 7535164 bytes) in > /usr/share/squirrelmail/functions/imap_general.php on line 123
—-
Edit PHP.INI
—
Ubah memory_limit = 16M
Menjadi
memory_limit = 160M
Instalasi FreeRadius pada Ubuntu Server 8.04
Published by umar-bgs on 13th September 2008Filed Under Distro Linux, Networking, Ubuntu
# apt-get install apache2
# apt-get install php5-common php5-gd php-pear php-db libapache2-mod-php5
# apt-get install php5-mysql
# apt-get install mysql-server-5.0
# apt-get install freeradius
# apt-get install freeradius-mysql
# mysql –u root –p
CREATE DATABASE radius;
GRANT ALL ON radius.* TO radius@localhost IDENTIFIED BY “radpass”;
exit;
# gunzip -d /usr/share/doc/freeradius/examples/mysql.sql.gz
# mysql -u root -p radius < /usr/share/doc/freeradius/examples/mysql.sql
# mysql -u root –p
use radius;
show tables;
quit;
# vi /etc/freeradius/sql.conf
readclients = yes
# vi /etc/freeradius/radius.conf
Pada bagian authorize letakkan sql sebelum bagian files(jika kita tidak mau menggunakan files, kita bisa berikan komen(tanda #) didepannya ), dan pada bagian accounting letakkan sql diantara unix dan radutmp.
# mysql -u root –p
use radius;
mysql> INSERT INTO radcheck (UserName, Attribute, Value) VALUES (’test’, ‘Password’, ‘password’);
mysql> INSERT INTO radcheck (UserName, Attribute, Value) VALUES (’test’, ‘Auth-Type’, ‘Local’);
# vi /etc/freeradius/sql.conf
server = “localhost”
login = “root”
password = “rahasia”
radius_db = “radius”
# vi /et/freeradius/clients.conf
secret = rahasiajuga
# run freeradius –X
# (Alt+F2)
# radtest test password localhost 1812 rahasiajuga
Sending Access-Request of id 59 to 127.0.0.1 port 1812
User-Name = “test”
User-Password = “password”
NAS-IP-Address = 255.255.255.255
NAS-Port = 1812
rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=59, length=20
Cek dahulu Library NCSA …
—
root~/># locate ncsa_auth
—
/usr/lib/squid/ncsa_auth
/usr/share/doc/squid/README.auth_module.ncsa_auth.gz
—
auth_param basic program /usr/lib/squid/ncsa_auth /root/usersquid
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl MENANGGAL src 192.168.1.0/255.255.255.0
redirect_children 5
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 110 # pop
acl Safe_ports port 119 20 # Lain2x
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 6667-7002 # IRC ports
acl Safe_ports port 5050 # YM ports
acl CONNECT method CONNECT
#acl porno1 url_regex -i “/etc/porno.txt”
#acl porno2 url_regex -i “/etc/squid/deny_access/domains”
acl ncsa_users proxy_auth REQUIRED
http_access allow ncsa_users