Install SourceTree without an Atlassian account?

Updated 2020-11-27 Happy to see that SourceTree allow users to skip the login procedure in version 3.3.9. For older versions: SouceTree uses accounts.json file to store account settings. It would skip the login process if there is an accounts.json file in your machine. So you can copy the accounts.json file in %AppData%\Atlassian\SourceTree\ to any other … Read more

Haskell: read input character from console immediately, not after newline

Yes, it’s a bug. Here’s a workaround to save folks clicking and scrolling: {-# LANGUAGE ForeignFunctionInterface #-} import Data.Char import Foreign.C.Types getHiddenChar = fmap (chr.fromEnum) c_getch foreign import ccall unsafe “conio.h getch” c_getch :: IO CInt So you can replace calls to getChar with calls to getHiddenChar. Note this is a workaround just for ghc/ghci … Read more

Sharing memory between two processes (C, Windows)

Although windows supports shared memory through its file mapping API, you can’t easily inject a shared memory mapping into another process directly, as MapViewOfFileEx does not take a process argument. However, you can inject some data by allocating memory in another process using VirtualAllocEx and WriteProcessMemory. If you were to copy in a handle using … Read more

How to disable or change IntelliJ IDEA splash screen?

To disable the splash screen add -Dnosplash=true in Help | Edit Custom VM Options or nosplash=true in Help | Edit Custom Properties. It can be also disabled by running with nosplash command line option. For example, idea.exe nosplash (on Windows). You can modify the menu/desktop shortcut to run with this parameter automatically. There is also … Read more

How can I hook Windows functions in C/C++?

Take a look at Detours, it’s perfect for this sort of stuff. For system-wide hooking, read this article from MSDN. First, create a DLL which handles hooking the functions. This example below hooks the socket send and receive functions. #include <windows.h> #include <detours.h> #pragma comment( lib, “Ws2_32.lib” ) #pragma comment( lib, “detours.lib” ) #pragma comment( … Read more

Genymotion error at start ‘Unable to load virtualbox’

I have spend all day to solve this error since none of the answers worked for me. I found out that oracle virtual box doesn’t install the network adapter correctly in windows 8.1 Solution: Delete all previous virtual box adapters Go to device manager and click “Action” > “Add legacy hardware” Install the oracle virtual … Read more