Skip to content

Instantly share code, notes, and snippets.

@nancy-tar
nancy-tar / readme.md
Created September 21, 2018 20:07 — forked from lgg/readme.md
Keepass file format explained

Keepass file format explained

I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.

@nancy-tar
nancy-tar / c# regex - find words starting with symbol
Created May 21, 2016 21:21
C# regex to find words starting with certain symbol or character set
\B-\S*(?=\b|\|\W|\s|\r|\n|$) - finding words starting with "-" symbol. You can change it to any.
For example: @"\B" +"your symbol"+ @"\S*(?=\b|\|\W|\s|\r|\n|$)"
Check c# regex:http://regexstorm.net/tester
@nancy-tar
nancy-tar / preventing_a_view_from_rotating.md
Last active May 14, 2016 17:51
Preventing a View From Rotating

#Preventing a View From Rotating ###Technical Q&A QA1890

Q:  My view controller supports auto-rotation but I need to lock the 
orientation of a specific subview. 
How can I prevent a view from rotating?

A: Autorotation is implemented by applying a rotation transform to the application's window when the system determines that the interface must rotate. The window then adjusts its bounds for the new orientation and propagates this change down through the view controller hierarchy via calls to each view controller's and presentation controller's -viewWillTransitionToSize:withTransitionCoordinator: method. Invocations of this method are provided a transition coordinator object containing the delta of the window's current transform and new transform, which can be retrieved by sending a -targetTransform message to the transition coordinator. Your view controller or presentation controller can derive the appropriate inverse transform and apply it to the target view. This nullifies the effect of the window