Archive for ronhks

Spring Data is Transctional

Is the databse transaction active?

org.springframework.transaction.support.TransactionSynchronizationManager.isActualTransactionActive()

 

Windows 10 start menü restore

1. Fix corrupted files

If the Search bar still works, search for powershell. Then right-click Windows PowerShell in the search results and select Run as administrator.

But if the search bar doesn’t work either, press Winkey-R, type powershell, and press Enter. Right-click the PowerShell icon on the taskbar and select Pin to taskbar. Close the PowerShell program. Hold down Shift and Cntrl while you right-click the PowerShell icon again. Select Run as administrator.

Once you’re in the Powershell command-line environment,  type the command sfc /scannow and press Enter. Then wait. It can take quite a while.

0411 sfc

Eventually, the program will tell you either that it found no corrupt Windows files, it found and fixed them, or it found some but couldn’t fix them. If you get the latter response, try the command

dism /online /cleanup-image /restorehealth

This should (hopefully) download replacement files.

Cert lementése remote szerverről linuxon

echo -n | openssl s_client -connect HOST:PORTNUMBER | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /tmp/$SERVERNAME.cert

 

Keresés tar archivumok fájljain belül

zgrep -a "keresett_string" 12*/audit.log.*.gz

vagy így is megeszi

zgrep -a keresett_string 12*/audit.log.*.gz

 

Outlook set sync folders

  1. You can open the Send/Receive Groups dialog by pressing the CTRL+ALT+S keyboard shortcut or as an alternative use:
    • Outlook 2007 and previous
      Tools-> Options…-> tab Mail Setup-> button Send/Receive…
    • Outlook 2010, Outlook 2013 and Outlook 2016
      File-> Options-> Advanced-> button Send/Receive…
  2. In the Send/Receive Groups dialog press the Edit… button.
  3. In the left section, select the account for which you want to modify the send/receive settings.
  4. In the Account Options section you can disable the option for “Receive mail items”.
  5. Press the OK button until you have closed all open dialogs.

How to get Apache Tomcat version

java -cp </usr/share/tomcat8>/lib/catalina.jar org.apache.catalina.util.ServerInfo

 

Let’s Encrypt howto

Clone Git repo:

sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt

than:

cd /opt/letsencrypt

Generate apache config and certs:

./letsencrypt-auto --apache -d example.com

or with subdomain

./letsencrypt-auto --apache -d example.com -d www.example.com

lets test it:

https://www.ssllabs.com/ssltest/analyze.html?d=example.com&latest

Enable auto renewal:

./letsencrypt-auto renew

output be similar like this:

Checking for new version...
Requesting root privileges to run letsencrypt...
   /root/.local/share/letsencrypt/bin/letsencrypt renew
Processing /etc/letsencrypt/renewal/example.com.conf

The following certs are not due for renewal yet:
  /etc/letsencrypt/live/example.com/fullchain.pem (skipped)
No renewals were attempted.

add it to crontab:

sudo crontab -e

add a line:

30 2 * * 1 /opt/letsencrypt/letsencrypt-auto renew >> /var/log/le-renew.log

grep list the whole line which matches

If we needs the whole line

grep -R -a 'XXX'

 

Java Calendar format eclipse-ben

The following effectively overwrites the toString() method for any class as seen using the Eclipse Debugger only, but I’ve found it very useful in decoding calendar objects while I debug.

Add a Debug Detail Formatter, using these steps:

  1. From the menu select Windows->Preferences
  2. In Preferences open Java->Debug and click on Detail Formatters
  3. Here you can add your desired formatter

As an example, for the calendar object:

  1. Click Add..
  2. Enter
    java.util.Calendar

    into the Qualified type name field

  3. Enter the following:
java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat("EEE, d MMM yyyy HH:mm:ss Z"); sdf.format(this.getTime());
  1. Ensure Enable this detail formatter is checked

Click OK.

 

src:

https://acoderslife.wordpress.com/2009/06/12/eclipse-java-debugging-showing-variable-type-values-calendar/

[FIX] YOUR HARDBRICKED LUMIA PHONES [NO JTAG] [Only for QHSUSB_DLOAD lumia (black screen, no vibration)]

Only for QHSUSB_DLOAD lumia (black screen, no vibration)

I got my lumia 620 hardbricked about a month ago while rolling back to windows 8.1 from windows 10 tech preview for phone .
i know there is a shit loads of people having their dead phones with them in the dust. about 2-3 days ago i came to a post which got myself a fully functional phone from a toy to my brother.

ONLY THING YOU NEED IS A NEAT INTERNET CONNECTION AND A SPARE TIME

so down below are the steps i followed .
first you need to download some files like drivers and the softwares .

DOWNLOADS

Drivers

X2_FlashDriver_Emergency_XP.rar (up to windows 8 32b)

X2_FlashDriver_Emergency.msi (windows 8 64b)

Nokia_WP8x_NXP_MTKx_Asha.rar

HEX files (subject of changes, please tell me about newer versions)

We only have hex files for x2x lumias (excl. 1520)

Confirmed_HEX.zip confirmed working RM 846, 892, 820, 821

Alternate_HEX.zip nearly all hex files we have

MPRG_HEX.zip

Software

WPRT (contains thor2.exe)

WindowsPhoneRecoveryToolInstaller.exe

Data Package Manager

Nokia_DataPackage_Manager_2013.7.5_fixed

important folders: (dont worry if you don’t have them : i didn’t had them either :P) but helps if you do have them

C:\ProgramData\Nokia\Packages\Products

C:\Program Files (x86)\Microsoft Care Suite\Windows Phone Recovery Tool

C:\Program Files\Microsoft Care Suite\Windows Phone Recovery Tool

64bit OS  32bit OS

DOWNLOAD ROM
install Nokia DataPackage manager and  fix pre dpm  (DataPackage Manager)

locate this label on your phone and write down

Type e.g. RM-846

Code e.g. 059S2G1

If you can’t find it, try searching here

launch DPM, if asked for login, select something from dropdown

enter your Type and Code, press search and click download (the play button)

 

after it’s 100%, we are done with DPM

INSTALL DRIVERS

install WPRT and all drivers from Nokia_WP8x_NXP_MTKx_Asha.rar

create C:\lumia\ folder (important)

We need to install/replace QHSUSB_DLOAD driver

open Device Manager – devmgmt.msc

look for QHSUSB_DLOAD

 

right click, uninstall and tick Delete driver software

now you should have

 

Windows 7 (Try win 8 part, should also work on win 7 and tell me)

extract X2_FlashDriver_Emergency_XP.rar to C:\lumia\driver

right click on , update driver, browse my computer, type in C:\lumia\driver

click next, if asked to install unsigned driver, confirm

 

Windows 8

Install unsigned drivers in windows 8

or

Install X2_FlashDriver_Emergency.msi (please confirm this works)

click in device manager

FLASH BOOTLOADER

(if you don’t undrstand how to edit following commands i attached some screenshots at THE BOTTOM; zoom it and help yourself :P)

We need to extract GPT0.bin, which is in the software we just downloaded

open Admin command prompt (cmd.exe). Commands to enter are Yellow

cd C:\Program Files (x86)\Microsoft Care Suite\Windows Phone Recovery Tool

locate FFU file in C:\ProgramData\Nokia\Packages\Products and change the red part below
thor2 -mode ffureader -ffufile “C:\ProgramData\Nokia\Packages\Products\rm-XXX\rest_of_path_to_file.ffu” -dump_gpt -filedir C:\lumia\

look for this in command output, this is your RootKeyHash (RKH) (THOSE TWO BIG LINES DOWN IN THE SCREENSHOT), save it for later

you shout get two files in C:\lumia\

open  Confirmed_HEX  and  Alternate_HEX  and  MPRG_HEX

look for hex file with same name as your Type

if you can’t find it, look for hex file with name matching your RKH

and copy it to  C:\lumia\ and rename to HEX.hex

 

flash the bootloader

thor2 -mode emergency -hexfile C:\lumia\HEX.hex -mbnfile C:\lumia\GPT0.bin -orig_gpt

Reboot the phone

if you get Red Screen with NOKIA logo go to FLASH SYSTEM

SAFE hex file was used and unallowed memory address was being written

PROBABLY means bootloader flashed (for RM-846)

Reboot the phone (pull usb and battery out OR hold power for ~15s)

If you still get QHSUSB, try again. You should get Red screen in 5 tries

After you get Red Screen with NOKIA logo continue below

THOR2_ERROR_CONECTION_NOT_FOUND
means Phone not detected   common cause is incorrectly installed driver

THOR2_EMERGENCYFLASHV1_ERROR_PROGRAMMER_SEND_FAILED

THOR2_EMERGENCYFLASHV1_ERROR_MSG_SEND_RECEIVE_FAILED
means invalid/wrong hex file

FLASH SYSTEM

You have to charge the device first. Connect it to charger (not PC) and let it sit for 30mins

flash FFU:

thor2 -mode uefiflash -maxtransfersizekb 256 -ffufile “C:\ProgramData\Nokia\Packages\Products\rm-XXX\rest_of_path_to_file.ffu”

optional use only after flashing failed multiple times (Scenario 1)

 

when you get to 100% and get Green Screen on your phone, you are almost done

now just reboot to windows

thor2 -mode rnd -bootnormalmode

First boot takes a long time and seems to have no progress

at first, there is small white NOKIA logo

then black screen with backlight on

this took about 15 minutes on lumia 620, 3 minutes on lumia 520

 

Scenario 1: many fails

It will reach ~5% and then crash. Reboot the phone (hold power for ~15sec) and try again

Now it may reach 10%, next time 15%, then 20.

Above 20 it increments by 10%.

Eventually it will get to 100%

Scenario 2: no fail

It will go straight to 100% with no crash

D_ERR : Rebooting from the WP/MMOS failed

Reboot the phone

FA_ERR_FFU_SEC_HDR_VALIDATION_FAIL

0xFA001106: Signature check of FFU file fails

currently unfixable, unknown cause

Failed to read number of eMMC sectors. eMMC is not working

Might be fixable with JTAG (phone repair shop)

FFU signature invalid

have you downloaded the right FFU with Nokia DPM?

In case your broke while “downgrading” from W10, you’ll probably have to wait until W10 ffu is released.

 

CODE COMBOs
tell me yours

RM-914 Lumia 520 confirmed hex

F771E62AF89994064F77CD3BC16829503BDF9A3D506D3FACEC AEF3F808C868FD

RM-915

7C81AABA97E4904DB782605A6C74A59480361E5A363337B2EF 5B8F925763110B

RM-917 Lumia 521

9DF6E11153C33AA85F7984C21EFA43AEDF9B82BE52199E83AE 53AA7625019F65

RM-846 Lumia 620 confirmed hex
67131691EEDD1F38568C7FFAE284FB2621680FEAC833314467 E31DAA963D1467

RM-943 Lumia 625 no bin/hex files

3676E9A0045A7EF8417B8E0E0677CED5F9DD47799826AEAE75 F7081818DE716E

RM-942

RM-824 Lumia 820

DB73418E5840941CE7BD35949085B8F74628D511F19285A092 ED3B600A64CC29

RM-820 Lumia 920

00E9427DF118D9E27D098D13BECB6C6C89CE59F4ECCF5549C4 9BC0DB952A6BB4

RM-821 confirmed hex

00E9427DF118D9E27D098D13BECB6C6C89CE59F4ECCF5549C 49BC0DB952A6BB4

RM-892 Lumia 925 confirmed hex

CD84376222AAF204C85119532BF34EA55C8844E4CEA35F3E50 8D25AA34D96637

RM-893

RM-910

RM-877 Lumia 1020

0CBD2EED6F62230571CBAB55B7DBC15F8A7DC7BB3F37C1E7E4 E5ADC77152FBC2

RM-994 Lumia 1320

RM-937 Lumia 1520 no bin/hex files

3774964A7E6AC7EF7D428DDC0C0EAD71640B0D8DD3BFC38291 10AF2D8ED68D7C

LASTLY I WANT TO THANKS BECAUSE OF WHOM I SAVED ANOTHER 15K (FOR MY NEW PHONE) Jakub Blazej .

Src: http://www.myownsteps.com/2015/05/fix-your-hardbricked-lumia-phones-only.html

 

Thanks Jakub! Its helped for me!