2019. december 22., vasárnap

OnePlus 3 gyári visszaállítás

OP3 factory reset:
https://www.androidsage.com/2017/03/22/restore-to-stock-oneplus-3-3t-with-latest-oxygen-os-firmware-complete-unroot/

OP3 Recovery Image:
http://oxygenos.oneplus.net.s3.amazonaws.com/recovery_op3.img

Fastboot Ubuntu:
https://blog.droidzone.in/2017/10/16/install-adb-and-fastboot-for-oneplus-3/

Custom TWRP Recovery:
https://twrp.me/oneplus/oneplusthree.html

2019. január 25., péntek

Send mass emails from Excel

If you create four columns:
Name Email Link Status

You can use this VBA macro to send the content of links to the specified emails.

Sub test2()

    Dim OutApp As Object
    Dim OutMail As Object
    Dim cell As Range

    Application.ScreenUpdating = False
    Set OutApp = CreateObject("Outlook.Application")

    For Each cell In Worksheets("Sheet1").Columns("B").Cells
        Set OutMail = OutApp.CreateItem(0)
        If cell.Value Like "?*@?*.?*" Then      'try with less conditions first
            With OutMail
                .To = Cells(cell.Row, "B").Value
                .Subject = "Your SUBJECT"
                .Body = "Hi " + Cells(cell.Row, "A") + "," + vbCrLf + vbCrLf + "YOUR_MESSAGE" + vbCrLf + " Your  result: " + vbCrLf + Cells(cell.Row, "C").Value + vbCrLf + vbCrLf + "Best regards,"
                .display
                'Stop                            'wait here for the stop
            End With
            Cells(cell.Row, "D").Value = "sent"
            Set OutMail = Nothing
        End If
    Next cell

    'Set OutApp = Nothing                        'it will be Nothing after End Sub
    Application.ScreenUpdating = True

End Sub

2019. január 22., kedd

Generate OpenSSL key for webapp

openssl req -x509 -out ssl.crt -keyout ssl.key \
  -newkey rsa:2048 -nodes -sha256 \
  -subj '/CN=localhost' -extensions EXT -config <( \
   printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")