Showing posts with label plata. Show all posts
Showing posts with label plata. Show all posts

Saturday, October 13, 2018

Laptop live linux

Imate Windows 10, koji Vam je dosadio, probali biste neka druga softverska usmerenja, osetili biste open-source ukus, a da to ne deluje na Windows 10, kao i da Vam nije neophodna instalacija  operativnog sistema.
Jedino je potrebno da upotrebom UNetbootin  https://unetbootin.github.io/ i nekog od ISO fajlova  napravite butabilni USB kojim startujete svoj PC. U BIOS-u podesite da se kompjuter startuje sa USB-a.
Iskoristite neku od novijih verzija Puppy Linux-a http://puppylinux.com/index.html :

Compatibility *BitsLatest VersionDownload link
Ubuntu Xenial32-bitXenialPup 7.5Main - Mirror - Checksum
Ubuntu Xenial 6464-bitXenialPup64 7.5Main - Mirror - Checksum
Slackware 14.132-bitSlacko Puppy 6.3.2Main - Mirror - Checksum
Slackware64 14.164-bitSlacko64 Puppy 6.3.2Main - Mirror - Checksum
Ubuntu Tahr32-bitTahrpup 6.0.5Main - Mirror - Checksum
Ubuntu Tahr 6464-bitTahrpup64 6.0.5Main - Mirror - Checksum
ili neku od starijih, ako imate slabiji hardver:
308.5M

Naravno noviji ISO Puppy Linuxa nude noviji i kvalitetniji softver namenjen novijim kompjuterima.

Ako je problem da podesite BIOS da se butuje sa USB (ili ste jednostavno manje verzirani), onda koristite PLOP BOOT MANAGER:

PLOP BOOT MANAGER BOOT-UJE GDE DRUGI NE MOGU:

DOWNLOAD:
https://download.plop.at/files/bootmngr/plpbt-5.0.15.zip

Sada nemate izgovora da ne probate Puppy Linux !

Tragate za svetim gralom stabilnosti i brzine koji Microsoft Windows ni u ludilu ne nudi, a Linux ga u nekim svojim distribucijama isijava kao prelepu svetlost open-source tehnologije.

Napomena: Tvoj stari Windows 10 ostaje potpuno netaknut. Nemate potrebu da brinete dok koristite Puppy Linux na Windows 10 kompjuteru. Windows 10 je aplsolutno bezbedan i siguran, a hard disk se na koristi pri upotrebi Puppy Linux-a. Ovaj linux se direktno puni u RAM memoriju kompjutera i "ne dira" ni jedan od drugih sistema i diskova na kompjuteru.


Ukoliko i Vi imate da reklamirate neki svoj proizvod ili slične sadržaje, blogove, knjige i sajtove slobodno me kontaktirajte.










Zaboravili ste WiFi lozinku, nema problema - za korisnike M$ Window$ 7,8,10

1 .startujte cmd.exe kao administrator i otkucajte ovo:
netsh wlan show profile

2. Kada ste saznali koja su sve imena za WiFi dostupna, kucaj ovo:
netsh wlan show profile WiFi-ime key=clear

Ovde je WiFi-ime ime tvog WiFi-ja za koji ti treba lozinka.

Dakle, prva naredba lista sva IMENA WIFI UREDJAJA, a druga naredba lista izmedju ostalog i LOZINKU koja te zanima.

Ako je nekome ovo pomoglo dajte mi neku pohvalu u komentar.



Friday, April 28, 2017

Elegantno merenje vremena izvrsenja PHP procedura

http://php.net/manual/en/function.microtime.php


ou can use microtime and calculate the difference:
$time_pre = microtime(true);
exec(...);
$time_post = microtime(true);
$exec_time = $time_post - $time_pre;


http://stackoverflow.com/questions/8310487/start-and-stop-a-timer-php

https://www.swebdizajn.com/blog/korisni-alati/alati-za-proveru-sajtova.php

Koja je brzina tvog servera ? PHP

Koja je brzina tvog servera ?

<?phpif (isset($_GET['source']))
{
    
highlight_file($_SERVER['SCRIPT_FILENAME']);
    exit;
}
$maxNumKB 4096;$defNumKB 512;
if (!isset(
$_GET['numKB']) || intval($_GET['numKB']) > $maxNumKB)
{
    
header("Location: http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?numKB=$defNumKB");
    exit;
}
$numKB intval($_GET['numKB']);?><!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>Jan! &raquo; PHP &raquo; speed test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <style type="text/css">
    <!--
    html
    {
        font-family: sans-serif;
        color: #000;
        background: #fff;
    }
    *
    {
        font-size: medium;
    }
    #wait
    {
        border-bottom: thin dotted black;
    }
    #wait abbr
    {
        border: none;
    }
    #done
    {
        font-weight: bold;
    }
    #benchmark
    {
        padding: 1em;
        border: 1px solid black;
        background: #ffe;
        color: #000;
    }
    //-->
    </style>
</head>
<body>
<div id="benchmark">
<p>
    <strong>This not a script to benchmark or determine the execution speed
    of PHP scripts.</strong> If you're looking for one, check out the PEAR
    <a href="http://pear.php.net/package/Benchmark">Benchmark package</a>.
</p>
<p>
    This script sends <?php echo $numKB?> <abbr title="kilobyte">KB</abbr>
    of HTML comments to your client. Parsing that HTML may add to the total
    transfer time, so don't take this as your raw download speed.
</p>
</div>
<h1>Please wait</h1>
<p>
    <a href="<?php echo "http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}?source=1"?>">(Show source)</a>
</p>
<p id="wait">
    Transferring <?php echo $numKB?> <abbr title="kilobyte">KB</abbr>
</p>
<!--
<?phpfunction getmicrotime()
{
    list(
$usec$sec) = explode(" "microtime());
    return ((float)
$usec + (float)$sec);
}
flush();$timeStart getmicrotime();$nlLength strlen("\n");
for (
$i 0$i $numKB$i++)
{
    echo 
str_pad(''1024 $nlLength'/*\\*') . "\n";
    
flush();
}
$timeEnd getmicrotime();$timeDiff round($timeEnd $timeStart3);?>-->
<p id="done">
    <?php
        
echo "Transferred {$numKB} <abbr title=\"kilobyte\">KB</abbr> in {$timeDiff} seconds, " .
             (
$timeDiff <= "more than {$numKB}round($numKB $timeDiff3)) .
             
' <abbr title="kilobytes per second">KB/s</abbr>';
    
?></p>
</body>
</html>

Thursday, April 27, 2017

LLMNR

REG ADD  “HKLM\Software\policies\Microsoft\Windows NT\DNSClient\
REG ADD ” HKLM\Software\policies\Microsoft\Windows NT\DNSClient” /v ” EnableMulticast” /t REG_DWORD /d “0” /f

gpedit.msc



To disable LLMNR on windows:
1. Click Start
2. Type gpedit.msc in the text box 
3. Navigate to Local Computer Policy -> Computer Configuration -> Administrative Templates -> Network -> DNS Client
4.  In the DNS Client Folder, double click on “Turn Off Multicast Name Resolution” and set it to “Enabled


The following registry key is set on computers when LLMNR is disabled:
HKLM\Software\Policies\Microsoft\Windows NT\DNSClient
"EnableMulticast" DWORD 0


http://www.computerstepbystep.com/turn-off-multicast-name-resolution.html




Tuesday, April 25, 2017

VBS tut

set shellobj = CreateObject("WScript.Shell")
shellobj.run "cmd"
wscript.sleep 100
shellobj.sendkeys "shutdown"
wscript.sleep 20
Shellobj.sendkeys " /s"
wscript.sleep 20
shellobj.sendkeys [ENTER]

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


x=msgbox("Would you like to open the Windows folder?" ,4, "Question:")

If x = vbNo Then Wscript.Quit(0)

If x = VbYes Then

Set WshShell = CreateObject("WScript.Shell")

X = WshShell.run("cmd /c explorer.exe ""C:\Windows""",0, true)

End If

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

strMB = inputbox("Please enter your message here:")

Set WshShell = CreateObject("WScript.Shell")

WshShell.run "cmd /c @echo msgbox " & """" & strMB & """" & ",4096,""VBS2CMD2VBS:"">C:\Message.vbs",0, true

WshShell.run "C:\windows\system32\wscript.exe C:\Message.vbs",0, false

Wscript.Quit(0)


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

strMB = inputbox("Please enter your message here:")

msgbox strMB, 4096, "Message"

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


(A)

x=msgbox("Would you like to continue?" ,4, "Question:")

If x = vbNo Then MsgBox "You selected 'No'", 4096, "No:"

If x = VbYes Then MsgBox "You selected 'Yes'", 4096, "Yes:"

(B)

x=msgbox("Would you like to continue?" ,4, "Question:")

If x = vbNo Then

MsgBox "You selected 'No'", 4096, "No:"

Wscript.Quit(0)

End If

If x = VbYes Then

MsgBox "You selected 'Yes'", 4096, "Yes:"

Wscript.Quit(0)

End If

(C)

x=msgbox("Would you like to continue?" ,4, "Question:")

If x = vbNo Then

MsgBox "You selected 'No'", 4096, "No:"

Else

MsgBox "You selected 'Yes'", 4096, "Yes:"

End If

Wscript.Quit(0)


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


x=msgbox("Would you like to continue?" & VbCrLf & "If you select No, you will see NO" & VbCrLf & VbCrLf & "If you select Yes, you will see YES",4, "Question:")

If x = vbNo Then

MsgBox "NO", 4096, "No:"

Else

MsgBox "YES", 4096, "Yes:"

End If

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


Set WshShell = CreateObject("WScript.Shell")

x = WshShell.Popup("Would you like to continue?",5,"Title:",4)

If x = vbNo Then Wscript.Quit(0)

If x = VbYes Then

'Your script goes here

msgbox "you selected YES!", 4096, "Yes"

End If


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



'************************************************
' File:    Input.vbs (WSH sample in VBScript) 
' Author:  (c) G. Born
'
' Retrieving user input in VBScript
'************************************************
Option Explicit

Dim Message, result
Dim Title, Text1, Text2

' Define dialog box variables.
Message = "Please enter a path"           
Title = "WSH sample user input - by G. Born"
Text1 = "User input canceled"
Text2 = "You entered:" & vbCrLf

' Ready to use the InputBox function
' InputBox(prompt, title, default, xpos, ypos)
' prompt:    The text shown in the dialog box
' title:     The title of the dialog box
' default:   Default value shown in the text box
' xpos/ypos: Upper left position of the dialog box 
' If a parameter is omitted, VBScript uses a default value.

result = InputBox(Message, Title, "C:\Windows", 100, 100)

' Evaluate the user input.
If result = "" Then    ' Canceled by the user
    WScript.Echo Text1
Else 
    WScript.Echo Text2 & result
End If

'*** End

'result = InputBox(prompt[, [title], [default], [xpos], [ypos]])
'The InputBox function has the following parameters:
'prompt A required parameter that defines the message shown in the dialog box. In Figure 8-1, this is the string Please Enter A Path.
'title An optional parameter that defines the title bar text for the dialog box.
'default An optional parameter that specifies the default value shown in the text box.
'xpos and ypos Optional parameters that define the position of the upper left corner of the dialog box.
'InputBox("Hello", "Test", , 100, 200)
'If result = "" Then    ' Test for Cancel.
'    WScript.Echo "Canceled"
'Else 
'    WScript.Echo "You entered: " & result
'End If
---------------------------------------

http://wsh2.uw.hu/ch08b.html

http://www.instructables.com/id/How-to-Make-a-message-box-using-VBScript/


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


Set objFSO=CreateObject("Scripting.FileSystemObject")

' How to write file
outFile="c:\test\autorun.inf"
Set objFile = objFSO.CreateTextFile(outFile,True)
objFile.Write "test string" & vbCrLf
objFile.Close

'How to read a file
strFile = "c:\test\file"
Set objFile = objFS.OpenTextFile(strFile)
Do Until objFile.AtEndOfStream
    strLine= objFile.ReadLine
    Wscript.Echo strLine
Loop
objFile.Close

'to get file path without drive letter, assuming drive letters are c:, d:, etc
strFile="c:\test\file"
s = Split(strFile,":")
WScript.Echo s(1)

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

Option Explicit

Const fsoForReading = 1
Const fsoForWriting = 2

Function LoadStringFromFile(filename)
    Dim fso, f
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.OpenTextFile(filename, fsoForReading)
    LoadStringFromFile = f.ReadAll
    f.Close
End Function

Sub SaveStringToFile(filename, text)
    Dim fso, f
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.OpenTextFile(filename, fsoForWriting)
    f.Write text
    f.Close
End Sub

SaveStringToFile "f.txt", "Hello World" & vbCrLf
MsgBox LoadStringFromFile("f.txt")

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


'You can create a temp file, then rename it back to original file:

Set objFS = CreateObject("Scripting.FileSystemObject")
strFile = "c:\test\file.txt"
strTemp = "c:\test\temp.txt"
Set objFile = objFS.GetFile(strFile)
Set objOutFile = objFS.CreateTextFile(strTemp,True)
Set ts = objFile.OpenAsTextStream(1,-2)
Do Until ts.AtEndOfStream
    strLine = ts.ReadLine
    ' do something with strLine 
    objOutFile.Write(strLine)
Loop
objOutFile.Close
ts.Close
objFS.DeleteFile(strFile)
objFS.MoveFile strTemp,strFile 


'Usage is almost the same using OpenTextFile:

Set objFS = CreateObject("Scripting.FileSystemObject")
strFile = "c:\test\file.txt"
strTemp = "c:\test\temp.txt"
Set objFile = objFS.OpenTextFile(strFile)
Set objOutFile = objFS.CreateTextFile(strTemp,True)    
Do Until objFile.AtEndOfStream
    strLine = objFile.ReadLine
    ' do something with strLine 
    objOutFile.Write(strLine & "kndfffffff")
Loop
objOutFile.Close
objFile.Close
objFS.DeleteFile(strFile)
objFS.MoveFile strTemp,strFile 


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

http://stackoverflow.com/questions/1142678/read-and-write-into-a-file-using-vbscript

http://stackoverflow.com/questions/2198810/creating-and-writing-lines-to-a-file


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


The File System Object, generally used by VBScript developers to read and write text files, can read only ASCII or Unicode text files. You cannot use it to read or write UTF-8 encoded text files.

But, if you can use Microsoft ActiveX Data Objects (ADO), you can read UTF-8 encoded text files like this:

Dim objStream, strData
Set objStream = CreateObject("ADODB.Stream")
objStream.CharSet = "utf-8"
objStream.Open
objStream.LoadFromFile("C:\Users\admin\Desktop\test.txt")
strData = objStream.ReadText()
If you want to write a UTF-8 encode text file, you can do so like this:

Dim objStream
Set objStream = CreateObject("ADODB.Stream")
objStream.CharSet = "utf-8"
objStream.Open
objStream.WriteText "The data I want in utf-8"
objStream.SaveToFile "C:\Users\admin\Desktop\test.txt", 2


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


http://developer.rhino3d.com/guides/rhinoscript/read_write_utf8/