Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

madhead/stack-autologin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Autologin to StackOverflow

So, you want to get a Fanatic badge on StackOverflow? But it's not very easy not to forget to login on it every day 100 times. Especially when you are on your vacation.. I had a 86-in-line :( and it was my third try.

Just schedule this Selenium test with cron and get your badge!

How to schedule

It is easy! You'll only need Xvfb installed for headless run.

Put a script like this somewhere on you FS, in my case it is ~/scipts/autostack.sh:

#!/bin/bash

export JAVA_HOME=/tools/java/jdk1.7.0_17
export M2_HOME=/tools/maven/apache-maven-3.0.5
export PATH=${PATH}:${JAVA_HOME}/bin:${M2_HOME}/bin

date=`date +%Y-%m-%d-%H-%M-%S`

Xvfb :10 -ac&
export DISPLAY=:10

pushd ~/projects/stack-autologin
mvn clean install
popd

killall Xvfb

And now schedule it with cron:

crontab -e

...

*/15 * * * * /home/madhead/scripts/autostack.sh

Testsuite tends to fail сonstantly, so I scheduled it to run every 15 minutes, which gives me 96 runs per day with a good chance to succeed.

Releases

No releases published

Packages

No packages published

Languages