. // // Alexey A.Znayev, znaeff@mail.ru, http://xbsoft.org, http://xbsoft.ru // /////////////////////////////////////////////////////////////////////////// // This file contains public class DNSBL // This class performs IP address check in spam blocking lists as described // on http://ru.wikipedia.org/wiki/RBL class DNSBL { private $_aCheckers = array( // list of checkers available for individual checking 'spamhaus' => array('.zen.spamhaus.org', true), //available for group checking with 'all' key 'spamcop' => array('.bl.spamcop.net', true), //available for group checking with 'all' key 'dsbl' => array('.list.dsbl.org', false), //not available for group checking with 'all' key 'ordb' => array('.relays.ordb.org', false), //not available for group checking with 'all' key 'sorbs' => array('.dnsbl.sorbs.net', false), //not available for group checking with 'all' key 'njabl' => array('.dnsbl.njabl.org', false) //not available for group checking with 'all' key ); // AZ - 1. Key 'all' is illegal // AZ - 2. Most of spammer IP addresses is covered by 'spamhaus' & 'spamcop' (and they are fast), // some of the rest may not work sometimes, you can make them group checking available after individual testing private $_sDefaultChecker = 'spamhaus'; /////////////////////////////////////////////////////////////////////////// // CheckSpamIP - check IP for spam in checkers : given, default or all available for group checking (may be slow) // parameters: // string $ip - ip address // string $checker - checker name or 'all' or nothing // returns: // true when IP exitsts in spam-lists of $checker or at least one of all checkers // false when not or when ip address is local or not correct public function CheckSpamIP($ip, $checker = ''){ if(empty($ip)) return false; if(preg_match('/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/', $ip) != 1) return false; $octets = explode('.', $ip); if($octets[0] == '127') return false; if($octets[0] == '10') return false; if($octets[0] == '192' && $octets[0] == '168') return false; if($octets[0] == '169' && $octets[0] == '254') return false; // ms windows if((int)$octets[0] > 255 || (int)$octets[1] > 255 || (int)$octets[2] > 255 || (int)$octets[3] > 255 ) return false; $ret_val = false; $PTR = implode(array_reverse($octets), '.'); if($checker === 'all'){ foreach(array_values($this->_aCheckers) as $c){ if($c[1]){ $ret_val = $ret_val || $this->_CheckDNSAnswer(dns_get_record($PTR . $c[0], DNS_A)); } if($ret_val) break; } }else if(array_key_exists($checker, $this->_aCheckers)){ $ret_val = $this->_CheckDNSAnswer(dns_get_record($PTR . $this->_aCheckers[$checker][0], DNS_A)); }else{ $ret_val = $this->_CheckDNSAnswer(dns_get_record($PTR . $this->_aCheckers[$this->_sDefaultChecker][0], DNS_A)); } return $ret_val; } /////////////////////////////////////////////////////////////////////////// // GetCheckers - gets list of available checker names // returns: // array of strings public function GetCheckers(){ return array_keys($this->_aCheckers); } /////////////////////////////////////////////////////////////////////////// // GetGroupCheckers - gets list of checker names available for group checking with 'all' key // returns: // array of strings public function GetGroupCheckers(){ $ret_val = array(); foreach(array_keys($this->_aCheckers) as $k) if($this->_aCheckers[$k][1]) array_push($ret_val, $k); return $ret_val; } /////////////////////////////////////////////////////////////////////////// // GetDefaultChecker - gets default checker name // returns: // string public function GetDefaultChecker(){ return $this->_sDefaultChecker; } /////////////////////////////////////////////////////////////////////////// // SetDefaultChecker - sets default checker name // parameters: // string $new_checker - new default checker name // returns: // true when success // false when failed ($new_checker is not in the list of available checker names) public function SetDefaultChecker($new_checker){ if(array_key_exists($new_checker, $this->_aCheckers)){ $this->_sDefaultChecker = $new_checker; return true; }else{ return false; } } /////////////////////////////////////////////////////////////////////////// // EnableGroupChecking - sets checker available for group checking // parameters: // string $checker - checker name // returns: // true when success ($checker is included) // false when failed ($checker is not in the list of available checker names) public function EnableGroupChecking($checker){ if(array_key_exists($checker, $this->_aCheckers)){ $this->_aCheckers[$checker][1] = true; return true; }else{ return false; } } /////////////////////////////////////////////////////////////////////////// // DisableGroupChecking - sets checker not available for group checking // parameters: // string $checker - checker name // returns: // true when success ($checker is excluded) // false when failed ($checker is not in the list of available checker names) public function DisableGroupChecking($checker){ if(array_key_exists($checker, $this->_aCheckers)){ $this->_aCheckers[$checker][1] = false; return true; }else{ return false; } } // private methods /////////////////////////////////////////////////////////////////////////// // _CheckDNSAnswer - checks DNS-server answer for 127.0.0.* values // returns: // true when success // false when failed private function _CheckDNSAnswer($dns_answer){ if(!is_array($dns_answer)) return false; $len = count($dns_answer); if($len <= 0) return false; for($i=0; $i<$len; $i++){ $obj = $dns_answer[$i]; if(!(is_object($obj) || is_array($obj))) return false; $ip_str = $obj['ip']; if(!is_string($ip_str)) return false; $pos = strpos($ip_str, '127.0.0.'); if($pos !== false) return true; } return false; } } // end of class DNSBL ?> Técnica Pomodoro: sé productivo

Técnica Pomodoro: sé productivo

Cuando uno tiene que trabajar con el ordenador es más que frecuente terminar derivando en distracciones de cualquier tipo, más aún si disponemos de Internet. En Indaltronia queremos que seas una persona de provecho, atenta al trabajo, que no se despiste… por eso te damos a conocer la técnica Pomodoro.

Desarrollada por Francesco Cirillo en 1992, la técnica Pomodoro es una de las más conocidas en cuanto a administración del tiempo y aumentar la productividad. La técnica consiste en dividir un trabajo en bloques (queda comprobado que el tiempo idóneo es de 25 minutos), cada bloque de tiempo trabajado, descansar un tiempo (5 mins) y volver a hacer un bloque de tiempo.

Explicado en detalle sería:

  • Bloque Pomodoro: Durante 25 mins, trabajamos al máximo en lo que hayamos decidido trabajar en ese bloque de tiempo. Esto no significa que haya que obsesionarse o trabajar con presión, sino estar centrados sólo y exclusivamente en el trabajo (olvidar y evitar abrir una pestaña del navegador, darle un vistazo al messenger…).
  • Descanso: Pasados los 25 mins del bloque Pomodoro, hay que descansar 5 minutos. En este descanso hay que intentar evitar pensar y/o hablar sobre el trabajo, desconectar la mente de lo que se estaba haciendo.
  • Una vez hechos 4 bloques Pomodoro (con sus respectivos descansos), es recomendable tener un descanso más grande (unos 15-20 minutos) y volver de nuevo con un bloque Pomodoro.

    Programas

    Para estar más al tanto, a continuación os dejamos algunos programitas para tener controlado el tiempo (algunos son configurables, tienen avisos sonoros/visuales…)

    Windows

    Extensión para Chrome

    Mac

    Online

    • FocusBooster: también descargable para usarlo con Adobe Air.

    5 comments to Técnica Pomodoro: sé productivo

    • Bitacoras.com  says:

      Información Bitacoras.com…

      Valora en Bitacoras.com: Cuando uno tiene que trabajar con el ordenador es más que frecuente terminar derivando en distracciones de cualquier tipo, más aún si disponemos de Internet. En Indaltronia queremos que seas una persona de provecho, atenta al…..

    • Abel  says:

      Ostia a mi me interesa esto, yo que me distraigo con nada, voy a probar a estudiar así 🙂

      • Javier Navarro Iribarne  says:

        El juego que puede dar una simple mosca… o tener un hilo colgando y marearlo… por no hablar de lo tentador que puede ser el icono de Chrome esperando ser pinchado…

    • Franco  says:

      Les recomiendo esta aplicación de escritorio para trabajar con la técnica:

      http://pomodorosuite.codeplex.com/

    • Franco  says:

      Ya salió la nueva versión de la herramienta en

      http://pomodorosuite.codeplex.com/

      Muy recomendable

    Leave a reply

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

    Connect with Facebook