Monday, 16 January 2012

BrandMyMail setp by step


BrandMyMail 
step by step



Go to www.brandmymail.com

Step 2 - drag plugins from right
Step 3 - Click to configure plugin


Step 4 - Configure your Signature plugin

Add and configure more plugins (optional)

Step 5 - Select a theme (optional)
Step 6 - Preview template (optional)

See your template result

Step 7 - Sign in with Google

Sign in and Accept

Step 9 - Install browser extension

Step 9 - Go to Gmail or BrandMyMail Dashboard

Step 10 - Write your email
Step 11 - Click Send or Preview

Step 10 - Email preview before sending

Sent email




Some notes:

 How to remove plugins?
You can remove plugins by clicking on Trash icon
You can align the plugin, using the justification buttons



Advanced notes:

Email fixed/expandable width:
When you add a banner bigger than 590px in top container, the email template gets fixed width.
If you use a smaller banner the email stays with 100% width.



















Wednesday, 21 December 2011

Playing with BrandMyMail - new design



Green Company Template

Lana Del Rey template

Tuesday, 20 December 2011

BrandMyMail templates

My BrandMyMail templates


Lana Del Rey template

Anonymous Template


Thursday, 22 September 2011

Tuesday, 13 September 2011

Ubuntu CheckGmail always prompt for password fix



Download patch from here

sudo /usr/bin/checkgmail -update
sudo patch /usr/bin/checkgmail checkgmail.patch

checkgmail

Saturday, 27 August 2011

Remote outlets, AVIDSEN and CHACON


Remote Control AVIDSEN (103107)

ON OFF
A 265353 265349
B 266325 266321
C 266649 266645
D 266757 266753
E 266793 266789

period 150
















Remote Control CHACON (EMW200RC)

ON OFF
1 164023 164022
2 172771 172770
3 175687 175686
4 176659 176658

period 360

(Note: you may have to try different period intervals, only this worked for me, and it is different from what i get in show_received_code program from RemoteSwitch Library)













How control remote outlets with Arduino ?

1 - Get an RF 433Mhz transmitter module
2 - Install RemoteSwitch library
3 - Connect module to PIN 4
4 - Upload program with the right codes













#include <RemoteSwitch.h>


#define OUTLET_A_ON 265353
#define OUTLET_A_OFF 265349
#define PERIOD 150;

#define RF_TX_PIN 4

void setup() {
Serial.begin(9600);
}

void loop() {
Serial.println("Sending off");
transmit(OUTLET_A_OFF);
delay(5000);

Serial.println("Sending on");
transmit(OUTLET_A_ON);
delay(5000);
}

void transmit(unsigned long rcode){
unsigned long code = rcode;
unsigned long period = PERIOD;
code |= (unsigned long)period << 23;
code |= 3L << 20;
RemoteSwitch::sendTelegram(code, RF_TX_PIN); // RF transmitter pin
}


Saturday, 20 August 2011

redmine installation problem

i was trying to install redmine from the link:

Got this problem:
genbox:~# gem install -v=2.3.5 rails
ERROR: could not find gem rails locally or in a repository

This fixed:
wget http://rubyforge.org/frs/download.php/74343/rubygems-1.5.3.tgz
tar -xf rubygems*tgz
cd rubygems*
ruby setup.rb
ln -s /usr/bin/gem1.8 /usr/bin/gem







Tuesday, 4 January 2011

Arduino Remote Control Outlet

Today i bought an remote control outlet kit from avidsen (2 adapters + remote control)
Using the library and info from here and here, was possible to decode the on/off codes.

After finding these codes, i added and actuator to the platform with two functions on() and off()



Electric water heater


Outlet adapter


Outlet adapter and remote control



Actuator in system


Mobile version





New update: i was forgetting one important thing, set a policy to turn on water heater between 7 am and 8 am and turn off after 8 am.


My policies in system


turn_heater_on policy info



Thursday, 9 December 2010

Preparing Arduino Bug Zapper


Objectives:

Detect when a bug is killed
Send data to server



Testing ATmega 328 with Arduino bootloader



No PCB :(



Bug Zapper racket


Next steps:

Attach Electret Microphone [link]
Attach 315MHz Transmitter module [link]
Calibration
Add everything to racket inside





Saturday, 20 November 2010

TMN A1 or Huawei U8230, switch applications, task list, recent applications

Use combination

off+menu

then choose "recent applications"

Friday, 29 October 2010

Visualizing Facebook friends presence

I have set up a XMPP bot that connects to Facebook XMPP server, and monitors my friends login and logout operations.

For now i am only monitoring presence, but another's aspects could be easily derived and/or monitored :)

Chart values:

"1" means that the user has entered Facebook
"0" means that the user has logout

Chart lines:

"\" lines means a user session, user logins and a time after the user logs out
"/" lines like this, means the user is entering Facebook after being logged out
"V" the formed V's represent the user login and logout history


Note: this post only contains data from 15:30pm to 3:08 am, from first monitoring attempt.

Data from 15:30pm to 3:08 am



Drilling-down (zooming)


Platform raw chart page


The platform im using to upload sensor data is sawa (related to sensors), no need to create databases, just upload data and then render chart :)


Thursday, 28 October 2010

SleekXMPP problems with DIGEST-MD5

I was trying to connect to facebook XMPP server using the sleekxmpp port that suports the SASL.

But was unable to connect....

1 2
    if not challenge['realm'] or not challenge['qop'] or not challenge['nonce']: KeyError: u'realm' 

Looking at protocol http://xmpp.org/rfcs/rfc3920.html#sasl the function handler_sasl_digest_md5_auth was not handling 2 essential steps:

"Step 7: Server sends another [BASE64] encoded challenge to client:"
and
"Step 8: Client responds to the challenge:"




Solution:
1
2
3
4
5
   self.sendPriorityRaw("""<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>%s</response>""" %base64.encodestring(response)[:-1])
self.digest_auth_started = True
else:
logging.warn("handler_sasl_digest_md5_auth called while digest_auth_started is True (has already begun)")
self.sendPriorityRaw("<response xmlns='urn:ietf:params:xml:ns:xmpp-sasl' />")

Tuesday, 19 October 2010

DHT11 Arduino with VirtualWire

By some reason when using VirtualWire library and using vw_setup(2000) caused the readings from humidity sensor to fail (dht11 start condition 1 not met). I looked at datasheet and changed a the times how the MCU starts to talk with the sensor.

The code is based from this post

Here is the the fixed code:

void InitDHT() {
 pinMode(TEMP_RH_PIN, OUTPUT);
 delay(1000);
 digitalWrite(TEMP_RH_PIN,HIGH);
}

void ReadDHT() {

 bGlobalErr=0;
 byte dht_in;
 byte i;
        
        // see datasheet to understand this
        pinMode(TEMP_RH_PIN, OUTPUT);
        digitalWrite(TEMP_RH_PIN,HIGH);
        
 digitalWrite(TEMP_RH_PIN,LOW);
 delay(18);

 digitalWrite(TEMP_RH_PIN,HIGH);
 delayMicroseconds(22);

 pinMode(TEMP_RH_PIN,INPUT);
 delayMicroseconds(5);

 dht_in=digitalRead(TEMP_RH_PIN);

 if(dht_in) {
  bGlobalErr=1;
  Serial.println("<dht11 start condition 1 not met");
  return;
 }
 
 delayMicroseconds(80);
 dht_in=digitalRead(TEMP_RH_PIN);

 if(!dht_in) {
  bGlobalErr=2;
  Serial.println("<dht11 start condition 2 not met");
  return;
 }
 delayMicroseconds(80);
 
        //now ready for data reception... pick up the 5 bytes coming from the sensor
 for (i=0; i<5; i++)
    dht_dat[i] = read_dht_dat();

 //Next: restore pin to output duties
 pinMode(TEMP_RH_PIN,OUTPUT);
 digitalWrite(TEMP_RH_PIN,HIGH);

 byte dht_check_sum = dht_dat[0]+dht_dat[1]+dht_dat[2]+dht_dat[3];

 /*Condition in following "if" says "if fifth byte from sensor
       not the same as the sum of the first four..."*/
 if(dht_dat[4]!= dht_check_sum) {
   bGlobalErr=3;
          Serial.println("DHT11 checksum error");   
 }

}


byte read_dht_dat() {
 //Collect 8 bits from datastream, return them interpreted
 //as a byte. I.e. if 0000.0101 is sent, return decimal 5.
 //Code expects the system to have recently entered the
 //dataline low condition at the start of every data bit's
 //transmission BEFORE this function is called.
 byte i = 0;
 byte result=0;
 for (i=0; i< 8; i++) {
  //We enter this during the first start bit (low for 50uS) of the byte
  //Next: wait until pin goes high
  while(digitalRead(TEMP_RH_PIN)==LOW);
  delayMicroseconds(30);
  if (digitalRead(TEMP_RH_PIN)==HIGH)//Was: if(PINC & _BV(dht_PIN))
  result |=(1<<(7-i));
  while (digitalRead(TEMP_RH_PIN)==HIGH);
  //Was: while((PINC & _BV(dht_PIN)));
 }
 //end of "for.."
 return result;
}

Thursday, 14 October 2010

Arduino code to read lines from serial input

Here is short and useful example to read lines from serial port in Arduino.

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
void setup (){
  Serial.begin(9600);
  Serial.flush();
  digitalWrite (13, HIGH);      //turn on debugging LED
}

void loop (){

  int i=0;
  char commandbuffer[100];

  if(Serial.available()){
     delay(100);
     while( Serial.available() && i< 99) {
        commandbuffer[i++] = Serial.read();
     }
     commandbuffer[i++]='\0';
  }

  if(i>0)
     Serial.println((char*)commandbuffer);

}

Saturday, 9 October 2010

python euromillion key generator with filters

From python, perl and ruby i selected python to start playing around (learn the language). I started with this nice tutorial "Learn Python in 10 minutes", and decided to port and old C program that generates all combinations of euromillions and then apply some filters.

The generator is for numbers only, it does not take into account the stars!!!

The solution is composed by two parts, the generator and the evaluator. The generator generates the combinations with the given filter list (e.g, python gnerator.py columns d_tens).
The evaluator, evaluates the success of the specified filters individually, and can evaluate all filters at same time.

As example the filter "first_number" rejects combinations with the first number more than 30

sh avaliator.sh first_number
################# first_numbers #####################
Running...
2044588 results 74172 rejected
~96.56160458452722063037%
###############################################

the report says that 15504 combinations was rejected and 97% of euromilions results are in the generated combinations file


However combining all filters (16 for now, and individually with 90% success), the success rate drops to 70% !!.

################# ALL #####################
Running...
1516959 results 601801 rejected
~70.77363896848137535817%
##########################################

Download here

Monday, 8 February 2010

How to change openfire password or how to login in openfire







Im having some problems with SSL certificates, i reinstalled openfire to see if that would fix.
At login, it seems not be working the password i set in setup installation. Theres a way to change the password and resolve the issue of not be able to login.

1- Access openfire database
2- Select table ofUser
3- Edit admin row
4- Set encryptedPassword to NULL
5- Enter a temporary pass on plainPassword
6- Save and restart openfire server
7- Use temporary password to login (username is always "admin")
8- Go to Users and edit admin
9- Enter a new password
10- Have fun :)



Monday, 14 December 2009

xfce4 verve plugin as standalone application


I liked very much this plugin, when i tried xfce4 last time, also i liked xfce4, but i didnt like the root menu, so i switched back to fluxbox.

This plugin is nice because:

- application launcher
- url, ftp and file launcher
- auto complete
- saves history commands

I did some changes on verve-plugin.c (mostly was deleting code, and fixing)
i didn't bore in putting the code 100% ok, may concern at the time was just to put it working...
For now i didn't notice any bug or crash :D

Download here



Tuesday, 8 December 2009

qtfarm farmville autocliker






Download here (built with QT and needs xdotool package(nix system))
New version here (uses xlib calls instead xdotool, but sometimes fails on click)
Bash script, check this post

Sunday, 29 November 2009

Farmville auto-clicker

New GUI here
Simple autoclicker script, needs xdotool installed

Download here
For default settings (12x12) use: sh farmville_click.sh
Or custom mode: sh farmville_click.sh num_rows num_columns click_interval_time wait_interval_before_pointing
If give this error(Syntax error: Bad for loop variable), use bash (bash farmville_click.sh)
Download old script here (bash script for *nix based)

Sunday, 6 September 2009

Bash Prompts


Nice article about Bash Prompts here.
Have fun :)