Applying SVN patch diff file to a GIT repository

  • Posted on: 7 September 2015
  • By: Michał Turecki

There are many FOSS projects using subversion for source control. I'm using GIT instead because or a unique mixture of features it has and a widespread use of GIT in FOSS community including legendary GitHub. Subversion is much less flexible and is worse performing regardless of popular opinions based mostly on better familiarity with it without "big picture" comparison. Major reason for my personal dislike of SVN is inability to browse the history of a repository without having an established network connection to the subversion repository server.

Getting the most out of SSH - hardware acceleration tuning for AES-NI

  • Posted on: 3 September 2015
  • By: Michał Turecki

On Intel some OpenSSH ciphers use hardware accelerated AES-NI extensions which leads to significally better performance. There is a pretty easy way to determine cipher performance on any particular Linux installation:

for i in `ssh -Q cipher`; do dd if=/dev/zero bs=1M count=100 2> /dev/null \
  | ssh -c $i someuser@localhost "(time -p cat) > /dev/null" 2>&1 \
  | grep real | awk '{print "'$i': "100 / $2" MB/s" }'; done

The script will only work if "someuser" has key authentication configured (~/.ssh/config contains a valid entry for someuser@localhost).

On Protobuf.Net, using AsReference and multiple instances of object which should be deserialized only once.

  • Posted on: 27 November 2014
  • By: Michał Turecki

There is a ProtoBuf.Net fact regarding using AsReference which somehow I missed when digging into why [ProtoAfterDeserialization] attribute is not applied for some objects.
The truth is that it is applied for some but not other objects even if I used AsReference attribute in some places. The AsReference attribute should be applied to ALL REFERENCES TO THE OBJECT, both collections and navigational properties, NOT JUST REFERENCES OTHER THAN THE REFERENCE WE CONSIDER MAIN ONE.

Updating CyanogenMod on an encrypted Android phone

  • Posted on: 24 November 2014
  • By: Michał Turecki
Tags: 

Required (Windows):

1. Download and install Universal ADB Drivers: https://github.com/koush/UniversalAdbDriver or http://adbdriver.com/downloads/
2. Download and install minimal ADB + Fastboot installation: http://forum.xda-developers.com/showthread.php?t=2317790
3. Open windows command prompt and go to folder when adb is installed - if in doubt SHIFT + right click on a folder containing newly installed adb.exe and select "Open command window here".

Now there are easy way and hard way. Easy first:

How to run another SSH daemon on Amazon EC2 - on a different port

  • Posted on: 31 October 2014
  • By: Michał Turecki

Running a separate SSH server only makes sense when a second SSHD will run using different settings. If settings are the same, port forwarding should be enough to just pass the traffic from one port to another:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 20202 -j REDIRECT --to-port 22

where 20202 is the new port and 22 is the default SSH port.

If SSHD settings should be separate, we need another sshd instance with a copy of current configuration files).

Please remember to change the alternative ssh port number (20202) to a custom port.

FlowDocument from a different thread - "The calling thread cannot access this object because a different thread owns it."

  • Posted on: 7 July 2014
  • By: Michał Turecki

The FlowDocument along with most of the elements it contains inherits from DispatcherObject class. This means when constructed, it becomes linked to the thread in which it was constructed and causes several implications.

How to reveal passwords (asterisks) on web pages using Google Chrome Inspect Element tool

  • Posted on: 25 July 2013
  • By: Michał Turecki

A quick howto:

  1. Right click on a password box with password entered into it by a password manager or another user and select "Inspect element". If right mouse button is disabled - press F12 and try again.
  2. Make a note of id="xxx" property on the input tag
  3. In the address bar type (case sensitive):
    javascript:alert(document.getElementById('xxx').value);
    

    Where xxx is the name identified in step 2.

You should see the alert window displaying the hidden password.

AnalysisLog.sr0 decrypted

  • Posted on: 31 March 2013
  • By: Michał Turecki

Curiosity is one important part of the engine of progress. Recently I've sent a bug report as Test Drive Unlimited 2 crashes on Windows Server 2012 and one of the files was named AnalysisLog.sr0.
It was created after a crash after I was kindly asked to voluntarily create it.
What's inside? As some suggest it contains encrypted private information.

What are the actual contents?

Google Picasa installation on Windows Server 2012 - "the current user is not allowed to install or update applications"

  • Posted on: 23 March 2013
  • By: Michał Turecki

My HTPC is running Windows Server 2012. It seems like an overkill but I am using it as a part of software development cycle which MSDN license allows and multiple desktops feature really helps.

There is one problem tough - many free versions of software are not happy about why someone would want to run something free while having (purposely) paid for, fully featured Windows Server. I am talking here about EaseUs Partition Master and other partitioning tools, free for home use.

Pages