miercuri, 15 decembrie 2010

Despre case

Cu multumiri pentru Cip care a furnizat urmatoarele date:
- casa in "camp", destul de departe de Bucuresti
- alarma cu mai multe tipuri de senzori, informare prin SMS si control telefonic
- incalzire cu centrala cu peleti. Problema este ca atunci cand se opreste curentul, produce fum, nu stim daca mult sau putin.

vineri, 10 decembrie 2010

Browser History stealing for ad networks

http://www.h-online.com/security/news/item/History-stealing-for-ad-networks-1147735.html

History stealing for ad networks

Espionage Teaser It has been known for several years, that web sites can snoop around in visitors' browser history. This summer, two developers found a way of refining and simultaneously speeding up the method. History stealing is based on the marking of links clicked on in a browser. Clicked on links are indicated by a different colour than those not yet clicked on. While the web sites visited cannot be read out via JavaScript, a list of sites can be investigated to see whether visitors have already been there. The optimised JavaScript presented in May reportedly allows up to 30,000 URLs to be queried per second.

According to a report in Forbes, these approaches are now in active use. The most prominent example is YouPorn, which checks what other pornographic web sites its visitors have already been to. Overall, the research group from the University of California at San Diego, found an additional 46 sites employing this method in the fields of news, financial reports, sports and games. The university's research reportPDF not only describes the method, but also lists web sites using it.

Forbes says there is a tremendous difference between sites like YouPorn and the photo service PixMac, on the one hand, and the other services investigated. The first two included the scripts on their web sites themselves, while advertising service providers had added the script to the other web sites.

Advertising sellers are probably the ones most interested in surfer histories. If surfers come across a web site, they may not be interested in a particular topic; they may have only landed there from a search engine query. However, if their browser history contains other web sites of the same kind, it pays for advertisers to present the right ads.

Some web site operators were apparently surprised when the report found this code in their web sites. Interclick, which markets advertising, told Forbes it had used such a script for a limited time between March and October as an experimental method of checking some data sets it had purchased. Interclick stated that the results from this method proved not to be useful so they stopped using it. Such tests are quite common, though not usually as hidden. YouPorn also told Forbes it has since stopped snooping around in its surfers' histories.

miercuri, 3 noiembrie 2010

Music player in Ubuntu

The default one is Rythmbox.
You have to add the MP3 Plugin (when it starts for 1st time it says they aren't and shows a button to get them).

Besides the common features, it's not obvious how to repeat same melody.
Well, the solution I have is to search for it until remains the only one in list.
Then just Play.

It will be repeated if you have Repeat activated (CTRL+R).

luni, 1 noiembrie 2010

Replace with appereance number

Using Jedit, at replace can be put a BeanShell snippet.
If you have a file with:
a
ba
abaa

And want to be like:
a1
ba2
a3ba4a5

(eg: a file with same error message in many places and you want to uniquely identify them)

Then in Jedit do:
- in search field enter: a
- change the option to use BeanShell instead of text
- enter in replace field: i=1
- press replace all
- click on main window press undo
- back, in replace field put: _0+i++
(_0 is the searched string ; + is for unification of the strings, i++ increases the value of i by 1)
- press replace all

The every appearance of the searched text is replaced with the text and the number of appearance.

joi, 7 octombrie 2010

Alte aplicatii

Care ne fac munca mai usoara in Ubuntu:
- pentru ca folosesc intens partea de sus a ecranului, sters Panel-ul din partea de jos si aplicatiile se minimizeaza in partea de sus.
- am scos meniul text de pornit aplicatiile si
- Gnome Do
- Search, Recoll

vineri, 1 octombrie 2010

Bookmarks si RSS oriunde

Folosesc Google Bookmarks and Reader astfel incat am acces la acestea de oriunde am intrat pe Internet.
In FF mi-am pus 2 butoane aferente (bookmarklet) pentru a salva situl in contul meu de la Google.

Butonu de Bookmark are acest cod:
javascript:(function(){var%20a=window,b=document,c=encodeURIComponent,d=a.open('http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk='+c(b.location)+'&title='+c(b.title),'bkmk_popup','left='+((a.screenX||a.screenLeft)+10)+',top='+((a.screenY||a.screenTop)+10)+',height=420px,width=550px,resizable=1,alwaysRaised=1');a.setTimeout(function(){d.focus()},300)})();

Butonul de Subscribe are atasat acest cod:
javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&&!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)}

joi, 30 septembrie 2010

Cum copy/paste?

In multe cazuri merge clasicul CTRL+C / CTRL+V .

Dar uneori nu. De ce? Pentru a face copy/paste, datele sunt copiate intr-un asa numit clipboard, o memorie temporara. Dar exista insa 2 clipboard-uri. Unul care se acceseaza clasic, iar celalalt folosind in plus tasta SHIFT. Deci CTRL+SHIFT+C / CTRL+SHIFT+V .

miercuri, 22 septembrie 2010

Cum instalam programe?

Programele se pot lua fie de pe situri, fie din asa numitele surse (sources) - un fel de depozite cu mai multe programe. De obicei, programele se livreaza sub forma de pachet, iar uneori sunt doar compresate.

Ubuntu are cateva variante de instalare a programelor:
A) cel mai usor: folosind Ubuntu Software Center
B) automat cu Synaptic Package Manager (SPM)
C) manual cu SPM
D) din linia de comanda


A) Click Applications > Ubuntu Software Center

Introduceti un cuvant cheie legat de programul pe care vreti sa il instalati.
Cuvantul va fi cautat, apare o lista de programe care il contin
Click pe rezultatul care va intereseaza si Apare un buton de Install.
Click pe Install, introduceti parola Dvs si cam asta ar fi. Programul apare in Applications in una din categorii.
(E posibil sa apara o eroare legata de surse, puteti incerca s-o rezolvati cu ajutorul internetului)

B) System > Administration > Synaptic Package Manager
La fel, cautati, click pe casuta sau click dreapta la un rezultat si selectati "Mark for installation" . Apoi click in bara de sus pe Apply (sau puteti selecta alte rezultate pentru instalare si dupa aceea Apply ca sa instalati mai multe dintr-o data).

C) Cele 2 variante de mai sus au folosit programe gasite in sursele incarcate in sistem (se pot adauga/elimina surse). In varianta aceasta, gasim un program pe un sit si incercam sa il descarcam (download).
C1) Programul este impachetat intr-o forma recunoscuta de sistem, va apare optiunea in fereastra de download, dam ok si programul va fi instalat automat.
C2) Daca nu este sub o forma recunoscuta, il aducem pe PC-ul nostru. Din fereastra de Downloads, dublu-click pe el, se deschide Archive Manager. Click pe Extract.
Din SPM : File > Add downloaded packages

D) sudo apt-get install

marți, 21 septembrie 2010

linux pentru incepatori

Voi incerca o serie de mici tutoriale care sa permita trecerea incepatorilor de la Windows la Linux (in special Ubuntu).

De ce?
Am observat ca oamenilor le este un pic frica, teama sa incerce alt sistem, iar aceasta nu poate veni decat din lipsa informatiilor structurate pentru incepatori, majoriatea tutorialelor fiind un pic prea tehnice.

Presupun ca incepatorul este acela care stie ce este o tastatura, un mouse, ecran, unitate centrala.

Pentru mai multe detalii puteti incerca http://forum.ubuntu.ro/ .

De ce Linux ?

Raspunsul simplu, pentru ca este gratis. Windows este pe bani.

Linux este o denumire generala pentru o categorie de sisteme de operare derivate din Unix (*NIX).
Derivatele acestea din Unix se numesc oficial distributii (Ubuntu, Debian, Fedora, Linux Mint etc)

Ubuntu este un sistem de operare asa cum este si Windows, permitand utilizatorului sa foloseasca un calculator (masina de calcul). Este usor de instalat, functioneaza din prima pe destul de multe masini (fata de alte distributii care pot necesita cunostinte mai multe). Detalii la http://ubuntu.ro/despre/ubuntu .


Ce este un calculator?
Un calculator este un dispozitiv care are 3 parti:
- o intrare (ex tastatura, mouse)
- o unitate de procesare
- o iesire (ex monitor, imprimanta)

Acestea 3 pot fi prezente ca dispozitive separate sau in diferite combinatii, chiar si ca un singur dispozitiv (telefonul, IPad).

La acestea se mai adauga:
-harddisk-ul - pentru a stoca datele cand masina este oprita. Caracteristici: capacitate mare, viteza mica.
-memoria (RAM) - pentru a stoca datele cu care lucram cand masina este pornita. Caracteristici: capacitate mica, viteza mare.
- diferite alte extensii (placa video pentru a reda pe un ecran, unitate optica - DVD/CD, placa de sunet).

Unitatea de procesare transforma datele introduse in date pentru iesire. Pot fi aceleasi date (litera apasata pe tastatura este afisata pe monitor) sau altele transformate (click-ul de mouse opreste muzica).

Instalarea Ubuntu
1) harddisk nou - usor, doar install
2) hardisk vechi si n-am nevoie de nimic de pe el - formatati-l la instalare
3) hardisk vechi si vreau sa pastrez si Windows-ul / alte date :
a) cel mai usor, apelati la cineva care are cunostinte mai avansate
b) mai dificil: se creeaza o partitie pe harddisk si se va instala acolo. Este posibil sa dea eroare ca nu mai puteti crea partitii - deoarece ati atins numarul maxim de partitii. Aici este cazul pentru cineva un pic mai avansat sa va ajute.

In timpul instalarii va cere un nume de utilizator si o parola (un ex: C03t!ca ) .

Dupa instalare, observam ca se incarca foarte repede.
Click pe numele de utilizator (username), introducem parola.

Bara cu butonul unde sunt programele este in partea de sus a ecranului, jos in stanga fiind butonul care va minimiza toate aplicatiile si va arata desktop-ul.

ps: aproape totul este customizabil, dar asta mai tarziu, dupa ce ne obisnuim si intelegem cum functioneaza.

El vine deja instalat cu o serie de aplicatii grupate pe categorii, inclusiv Office (asemanator cu cel de la Windows (Microsoft) si destul de bun).

Butoanele sunt in stanga, nu in dreapta, cum le mut?
System > Appearance > selectati tema Clearlooks .

luni, 13 septembrie 2010

Premature end of data in tag VirtualBox

The xml is corrupt.
I went in its folder and found a "-prev" xml.
Moved the bad one , copy the prev with the name of the bad one and VirtualBox started ok.

marți, 29 iunie 2010

Setting keep alive for unix

We have to change the value shown by:
>cat /proc/sys/net/ipv4/tcp_keepalive_time

-usually is 7200

To change it:
- >sudo vi /etc/rc.local #to remain after boot
- echo "900" > /proc/sys/net/ipv4/tcp_keepalive_time #to modify
- >sudo /etc/rc.local #to have it

Other way:
- >sudo sysctl -w net.ipv4.tcp_keepalive_time=1800

miercuri, 23 iunie 2010

Moving from Windows XP to Linux Ubuntu

It was easy because all you have to is to just copy a folder, usually from 'Documents and Settings\\Application Data', to your home directory /export/home/:
-email - Thunderbird - the profile folder
-text editor - Jedit - the .jedit folder
-DB client - Squirrel - .squirrel
-IM - pidgin - .purple

miercuri, 9 iunie 2010

Automate Windows XP services management

When are problems and don't want to manually process all Windows XP services, the tool below can be used :

(thx to http://commandwindows.com/sc.htm )
services_automate.bat :

@echo off

set lp=%~dp0

cd %lp%
rem sc [command] [service name] ...
rem interesting is also the "config" command

echo "Starting setting of services to automatic"
for /F "delims= " %%i in (%lp%\services_names.txt) do (
echo "%%i"
sc start %%i
)
echo End
rem pause

(I got it from web, but can't find now the source to mention :( )
services_names.txt :
ALG
AppMgmt
AudioSrv
BITS
Browser
CryptSvc
DcomLaunch
Dhcp
dmadmin
dmserver
Dnscache
ERSvc
Eventlog
EventSystem
IDriverT
IISADMIN
lanmanserver
lanmanworkstation
LmHosts
MDM
MSDTC
MSFtpsvc
napagent
NetDDE
NetDDEdsdm
Netlogon
Netman
NetSvc
Nla
NMSAccess
NtLmSsp
NtmsSvc
ntrtscan
OfcPfwSvc
PlugPlay
PolicyAgent
ProtectedStorage
RasMan
RemoteAccess
RpcLocator
RpcSs
SamSs
Schedule
seclogon
SENS
SharedAccess
ShellHWDetection
SMTPSVC
Spooler
srservice
SSDPSRV
stisvc
TapiSrv
TermService
Themes
tmlisten
TrkWks
upnphost
UPS
VSS
W32Time
W3SVC
WebClient
winmgmt
Wmi
WmiApSrv
wuauserv
WZCSVC

marți, 20 aprilie 2010

De cand fumatul pe strada a devenit ceva normal?

Dai cu fum in mine, dau cu apa in tine.

ps:
De cand multe obiceiuri incriminate de codul bunelor maniere au devenit normalitate ca manifestare in public?

vineri, 2 aprilie 2010

Status

I'll start to post my im status messages.

Till now I had:

-De ce e civilizatie in afara? Din cauza educatiei
Sistemul de educatie de la noi permite avansarea celor care nu sunt pregatiti, fie ca sistemul de evaluare este slab (scolile de soferi), fie ca evaluatorii o permit (invatamantul)

- A lot of children and women smoking
Why only women and not men quoted ? Because they carry the baby.

- Did you kiwi (wiki) your knowledge ?
Sharing of information is our civilization engine. Some think if keep it unshared, they have the advantage. But they don't realize that they already know it, understand and use it. They have and keep their advantage of time until the others understand and can use that information.

- No coffee, no work
Fact: people drink coffee (tee) at work. As employer, do you want they spent time in preparing and consuming or just in consuming?

joi, 18 februarie 2010

How to add week numbers to Google Calendar?

It is very simple after understood:
- open the Calendar page
- on left notice "Other calendars"
- press "Add"
- "Browse interesting Calendars"
- "Holiday" tab is selected by default
- Click "More" tab
- on line with "Week Numbers" click "Subscribe"
- done, click "Back to calendar"

In "Week" view, it appears for the first day of the week (can be set), above the hours.
In "Month" view, it appears for each first day of the week.



If tried to search for help:
- you get this page
- but there can't be found the info
- you have to open "More"
- there you'll find the "Week Number" procedure

miercuri, 6 ianuarie 2010

jedit - locally backup with timestamp the FTP modified files

Starting from
http://community.jedit.org/?q=node/view/1209#7340 - which does only 1 file, I wanted a file for each save. I've done it using timestamp in format yyyymmddhhmmss.
(error: if system date is changed, it's possible a file to be overwritten)

//---------save-backup.bsh------------

import java.util.Calendar;
import java.text.SimpleDateFormat;

//backup path
BackupPath = "Z:\\Jedit_backups\\"; //don't forget the trailing \\

Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
timestamp = sdf.format(cal.getTime());


path = buffer.getDirectory();
path = path.replaceFirst("ftp://", "");
path = path.replace('/', '\\');
path = path.replaceAll(":", ""); //this is for local files (c:\ -> c\

//todo : remove other unwanted characters ?

path = BackupPath + path;

(new File(path)).mkdirs(); //create the backup directory if it doesn't exist


path = path + buffer.getName() + '_' + timestamp;
// buffer.getLastModified(); - fails for FTP: puts 0 - all the time

buffer.save(view,path,false); //save copy
VFSManager.waitForRequests();
buffer.save(view,null,true);

Macros.message(view, "Backup done in " + BackupPath);

//--------end

- put this in a file, eg save-backup.bsh
- put the file in a subfolder (eg Files) of 'macros' folder from jedit installation
- open jedit
- Utilities > Global Options > Shortcuts
- enter, in the 'filter' field, the name of the file
- click in the 'Primary shortcut'
- press CTRL + s (the 'Save' shortcut)
- accept the override
- in 'Saving & Backup' put the 'Max number of backups' to 0 (zero - it disables other backups)
- press OK to save changes
(done in Jedit 4.3)