sexta-feira, outubro 12, 2012

Pesquisa Runtime no History em Linux


Para quem não sabe, se quando estão na linha de comando fizerem CTRL+R aparece a prompt abaixo e podem iniciar a escrever e acabarão por conseguir navegar no histórico de comandos, apanhando o último que fizeram e basta fazer enter assim que ele reconhecer o comando.

~]$
(reverse-i-search)`cd lo': cd log/

terça-feira, outubro 09, 2012

WGET command

If you have a proxy you will need to start with this command

$ export http_proxy=http://100.1.1.1:8080

And then you just need to call the site

$ wget -O- http://www.google.pt

The result should be like this - getting all the HTML page:

--12:37:20--  http://www.google.pt/
Connecting to 100.1.1.1:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `STDOUT'
    [&lt;=&gt;                                                                                                                                      ] 0           --.-K/s             <html itemscope="itemscope" itemtype="http://schema.org/WebPage"><head><title>Google</title><script>window.google={kEI:"cAx0UKm4DvCX0QWshYGYBA",getEI:function(a){var b;while(a&&!(a.getAttribute&&(b=a.getAttribute("eid"))))a=a.parentNode;return b||google.kEI},https:function(){return window.location.protocol=="https:"},kEXPI:"17259,23628,32690,35704,39523,39978,4000116,4000354,4000553,4000624,4000648,4000743,4000833,4000955,4001001,4001013,4001064,4001132,4001145,4001188,4001192,4001267,4001293,4001441,4001449,4001461",kCSI:{e:"17259,23628,32690,35704,39523,39978,4000116,4000354,4000553,4000624,4000648,4000743,4000833,4000955,4001001,4001013,4001064,4001132,4001145,4001188,4001192,4001267,4001293,4001441,4001449,4001461",ei:"cAx0UKm4DvCX0QWshYGYBA"},authuser:0,
ml:function(){},kHL:"pt-PT",time:function(){return(new Date).getTime()},log:function(a,b,c,e){var d=new Image,h=google,i=h.lc,f=h.li,j="";d.onerror=(d.onload=(d.onabort=function(){delete i[f]}));i<

...

(google.stt!==undefined)google.kCSI.stt=google.stt;google.csiReport&&google.csiReport()}if(window.addEventListener)window.addEventListener("load",
l,false);else if(window.attachEvent)window.attachEvent("onload",l);google.timers.load.t.prt=(f=(new Date).getTime());
})();
    [ <=>                                                                                                                                     ] 11,527      --.-K/s   in 0.001s
12:37:20 (20.6 MB/s) - `-' saved [11527]
</script></body></html>

segunda-feira, outubro 08, 2012

How to Add Background Music to Your Web Page

The best I prefere For Opera and all IE versions, the following code works: As you probably have noticed, IE 3.0 and above support both methods, so you cannot simply put both those tags into your web document in the hope of supporting all browsers. It will work on Netscape and early versions of IE, but the newer versions of IE will recognize both tags, leading to problems when IE tries to load the music file twice. The workaround that I've seen on some sites, that seems to work for me, is to enclose the BGSOUND tag inside NOEMBED tags, thus preventing IE from interpreting the second tag. <bgsound src="yourmusicfile.mid" loop="infinite"> This code appears to be compatible with all versions of IE, Netscape and Opera. How to Add Background Music to Your Web Page

terça-feira, outubro 02, 2012

FINDSTR to get smaller log files

Quando os logs estão a ficar muito grandes e quiserem fazer uma pesquisa dentro das máquinas windows podem e devem usar o comando abaixo:

    findstr /s /i /C:"[texto a pesquisa]" "*.*" > "[Nome do Ficheiro onde ficam os logs]"