Sunday, November 20, 2011

Setting Up Webserver to Bypass Belkin Router and Use DynaDot Domain

Belkin

Firewall > Virtual servers




Enable
DescriptionInbound portTypePrivate IP address Private port 
1. - 192.168.2. - 


Click Enabled


Private IP adddress must match YOUR ip the router assigns you on your machine
See DHCP client list

Go to dynadot
Select Name Servers
Select DNS tab

Create Record Type A with your IP address external websites see.

Click Use Dynadot DNS

Done.

Saturday, October 22, 2011

Configuring Wireless on Kubuntu 11.10 Rogers Communication Belkin Router

Just install WICD, forget the built in network manager

Click the K
Type Konsole

sudo apt-get install wicd


--------------------------


or set network manager cone mac address 
wap2
infrasturucture
password

Monday, October 10, 2011

Turn off laptop screen monitor while computer is still running command for Ubuntu Linux

Just write this in a terminal window
xset dpms force off

go to sleep and your laptop won't overheat and you will save money

Saturday, September 17, 2011

XMacro Go To Website Copy Stuff from Excel and Paste

Setup
First window open is openoffice excel document
second is website
third is terminal

//Wait two seconds
Delay 2
//Open location in firefox
KeyStrRelease Control_L
KeyStrPress Control_L
KeyStrPress l
KeyStrRelease l
KeyStrRelease Control_L


String https://www.websitetouloadstuff.com

//Hit enter goes to site so wait 7 seconds
KeyStrPress Return
KeyStrRelease Return
Delay 7

//create
KeyStrPress c
KeyStrRelease c

//alt tab to excel
KeyStrPress Alt_L
Delay 1
KeyStrPress Tab
KeyStrRelease Tab
Delay 1
KeyStrPress Tab
KeyStrRelease Tab
KeyStrRelease Alt_L

//copy data
KeyStrPress Control_L
KeyStrPress c
KeyStrRelease Control_L
KeyStrRelease c

//go down a cell
KeyStrPress Down
KeyStrRelease Down

//alt tab to firefox
KeyStrPress Alt_L
Delay 1
KeyStrPress Tab
KeyStrRelease Tab
KeyStrRelease Alt_L

//paste info
KeyStrPress Control_L
KeyStrPress v
KeyStrRelease Control_L
KeyStrRelease v
Delay 1

//change loxcation
KeyStrPress Tab
KeyStrRelease Tab
KeyStrPress Tab
KeyStrRelease Tab
KeyStrPress Tab
KeyStrRelease Tab
KeyStrPress Down
KeyStrRelease Down
KeyStrPress Return
KeyStrRelease Return
Delay 5
//hit enter so load site

//save it
KeyStrPress Control_L
KeyStrPress s
KeyStrRelease Control_L
KeyStrRelease s

//rinse repeat

bash run.sh
#!/bin/bash
for (( i=0; i<4000; i++ ))
do
cat xmacro_v5.log | xmacroplay ":0.0"
done

xmacrorec2

install from ubuntu repository xmacro

//record it
xmacrorec2 > xmacro_v2.log
//hit home key, so don't ever press home key while recording
//saver.log is in top level of root directory

//replay it
cat xmacro_v2.log | xmacroplay ":0.0"

don't use the delay optino in xmacroplay...
hard code it in saver.log other keypresses will last 5 seconds, including control keys!!


Here is an example log file

Delay 3
MotionNotify 306 797
ButtonPress 1
ButtonRelease 1
Delay 1
MotionNotify 861 92
ButtonPress 1
ButtonRelease 1
Delay 1
MotionNotify 966 187
KeyStrPress Control_L
KeyStrRelease Control_L
KeyStrPress Control_L
KeyStrRelease Control_L
KeyStrPress Control_L
KeyStrRelease Control_L
KeyStrPress Control_L
KeyStrPress k
KeyStrRelease k
KeyStrRelease Control_L
KeyStrPress Control_L
KeyStrPress c
KeyStrRelease c
KeyStrRelease Control_L
KeyStrPress Control_L
KeyStrPress l
KeyStrRelease l
KeyStrRelease Control_L
KeyStrPress Control_L
KeyStrPress v
KeyStrRelease Control_L
KeyStrRelease v
KeyStrPress Return
KeyStrRelease Return
Delay 5
KeyStrPress c
KeyStrRelease c
MotionNotify 121 786
ButtonPress 1
ButtonRelease 1
Delay 5
KeyStrPress Control_L
KeyStrPress c
KeyStrRelease Control_L
KeyStrRelease c
MotionNotify 323 799
KeyStrPress Down
KeyStrRelease Down
MotionNotify 289 787
ButtonPress 1
ButtonRelease 1
Delay 5
KeyStrPress Control_L
KeyStrPress v
KeyStrRelease Control_L
KeyStrRelease v
KeyStrPress Tab
KeyStrRelease Tab
KeyStrPress Tab
KeyStrRelease Tab
KeyStrPress Tab
KeyStrRelease Tab
KeyStrPress Down
KeyStrRelease Down
MotionNotify 270 249
ButtonPress 1
ButtonRelease 1
Delay 5
MotionNotify 1091 237
ButtonPress 1
ButtonRelease 1
Delay 5


To run xmacro in a loop

create a bash file with executable permissions
such as bash-xmacro.sh then run it
bash bash-xmacro.sh


#!/bin/bash
for (( i=0; i<5; i++ ))
do
cat xmacro_v2.log | xmacroplay ":0.0"
done

Saturday, August 13, 2011

Catalog View as Images on Homepage

Need modify controller to supply image variable.
opencart/catalog/controller/module/category.php
Need to modify view.
opencart/catalog/view/theme/default/template/module/category.tpl

First add the image in the view
img src="/opencart/image/ $category['image']

don't forget the comma.

If you look in the database there is a table called
category with a column called image that has the url.


However, this is the big full size image we need to shrink it.

$this->load->model('tool/image');
this loads the tool
$image = $this->model_tool_image->resize($category['image'], $this->config->get('config_image_category_width'), $this->config->get('config_image_category_height'));
this shrinks the image found in database table category column image





VQmod

http://www.vqmod.com

Important if you want to do custom modifications.
It uses XML script files to modify via regexp the PHP files