Skip to content

Instantly share code, notes, and snippets.

View ariews's full-sized avatar

Arie W. Subagja ariews

View GitHub Profile
/**
* Takes the given HTML data, replaces all its HTML tags with nothing, splits the result by spaces,
* and outputs the array length i.e. number of words.
*
* @param string htmlData HTML Data
* @return int Word Count
*/
function GetWordCount(htmlData) {
return htmlData.replace(/<(?:.|\s)*?>/g, '').split(' ').length;
}
/**
* Takes the given HTML data, replaces all its HTML tags with nothing, splits the result by spaces,
* and outputs the array length i.e. number of words.
*
* @param string htmlData HTML Data
* @return int Word Count
*/
function GetWordCount(htmlData) {
var count = 0;
[user@host] $ cd eggdrop1.6
[user@host] $ ./configure
[user@host] $ make config
[user@host] $ make
[user@host] $ make install
[user@host] $ cd ~/eggdrop
<?php
$k++;
$db_host[$k] = 'dbhost_1';
$db_name[$k] = 'dbname_1';
$db_user[$k] = 'dbuser_1';
$db_pass[$k] = 'dbpass_1';
$k++;
$db_host[$k] = 'dbhost_2';
<?php
function MyCounter () {
global $HTTP_COOKIE_VARS;
if (!is_file($this->DataFile)) {
$o = array ("1");
$this->insert($this->DataFile, $o);
}
if (!isset($HTTP_COOKIE_VARS['counter'])) {
<?php
$directory_to_check = '/path/to/dir';
$DTs = array(realpath($directory_to_check));
$DSc = array();
while (count($DTs) > 0)
{
foreach ($DTs as $DKy => $std)
login as: root
Sent username "root"
root@202.154.x.xxx's password:
Last login: Sun Oct 31 15:30:53 2004 from xxx.x.xxx.xx.xx
OpenBSD 3.1 (GENERIC) #59: Sat Apr 13 15:28:52 MDT 2002
Welcome to OpenBSD: The proactively secure Unix-like operating system.
Please use the sendbug(1) utility to report bugs in the system.
Before reporting a bug, please try to reproduce it with the latest
<?php
$sitename = 'Log Channel!'; // title atau nama web
$url = 'http://arie.malam.or.id'; // alamat web
$client = new Zend_XmlRpc_Client('alamat_ping_server');
try {
$respon = $client->call('weblogUpdates.ping', array(
$sitename, $url
));
<?php
$sitename = 'Log Channel!'; // title atau nama web
$url = 'http://arie.malam.or.id'; // alamat web
$feed_url = 'http://arie.malam.or.id/feed.atom'; // alamat feed
$client = new Zend_XmlRpc_Client('alamat_ping_server');
try {
$respon = $client->call('weblogUpdates.extendedPing', array(
$sitename, $url, $feed_url
<?php
Kohana::modules(array(
// ....
'malam-lorempixel' => MODPATH.'malam-lorempixel',
// ....
));