Tag Archive for router

Zend Router simple extension through simple regex

/**
* Add this in your bootstrap
*/
protected function _initRoutes() {
    
            $ctrl = Zend_Controller_Front::getInstance();
            $router = $ctrl->getRouter();
            //match every call on <a href="http://ZEND_ROOT/aZ2s-Ty9" >http://ZEND_ROOT/aZ2s-Ty9</a>
            $route = new Zend_Controller_Router_Route_Regex('([a-zA-Z0-9]+-[a-zA-Z0-9]+)',
                array(
                    //dispatch this to the VController
                    'controller' => 'v',
                    // iAction()
                    'action'     => 'i'
                    ),
                array(
                    //send the captured value has the "e" parameters of the request
                    1 => 'e'
                    )
            );
    
            //give a name to your route and add it to the default router
            $router->addRoute('view',$route);
        }

source

Reconnect Alice IAD 5130

#!/bin/bash
curl -d "getpage=..%2Fhtml%2Ftools%2Freboot.html&errorpage=..%2Fhtml%2Falice%2Fframework.html&var%3Alang=alice&var%3Apagename=system_reset&var%3Aerrorpagename=system_reset&var%3Amenu=&var%3Apagemaster=&time%3Asettings%2Ftime=&logic%3Acommand%2Freboot=..%2Fgateway%2Fcommands%2Fsaveconfig.html" <a href="http://alice.box/cgi-bin/webcm

" >http://alice.box/cgi-bin/webcm
source

set static IP from command line in Ubuntu

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# This is a list of hotpluggable network interfaces.
# They will be activated automatically by the hotplug subsystem.
mapping hotplug
script grep
map eth0

# The primary network interface
iface eth0 inet static
address 192.168.1.100
netmask 255.255.255.0
gateway 192.168.1.1

source