Skip to content

Instantly share code, notes, and snippets.

View danieldogeanu's full-sized avatar

Daniel Dogeanu danieldogeanu

View GitHub Profile
@danieldogeanu
danieldogeanu / MakePowerShellRememberSSHPassphrase.md
Last active April 23, 2024 12:18
How to make Powershell remember the SSH key passphrase.

You should not use the Open SSH client that comes with Git for Windows. Instead, Windows 10 has its own implementation of Open SSH that is integrated with the system. To achieve this:

  1. Start the ssh-agent from Windows Services:
  • Type Services in the Start Menu or Win+R and then type services.msc to launch the Services window;
  • Find the OpenSSH Authentication Agent in the list and double click on it;
  • In the OpenSSH Authentication Agent Properties window that appears, choose Automatic from the Startup type: dropdown and click Start from Service status:. Make sure it now says Service status: Running.
  1. Configure Git to use the Windows 10 implementation of OpenSSH by issuing the following command in Powershell:
git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe
@danieldogeanu
danieldogeanu / InstallSQLite.md
Last active September 24, 2019 05:06
How to install SQLite 3 on Windows 10.
  1. Go to the SQLite download page;
  2. Under Precompiled Binaries for Windows download sqlite-tools-win32-x86-3290000.zip;
  3. Extract sqlite-tools-win32-x86-3290000.zip on the C:\ drive (it can be in the root of the drive or in a folder without spaces in its name);
  4. Search for "environment variables" in Windows Search and click on Edit the system environment variables;
  5. In the System Properties window click Environment Variables...;
  6. Under System variables select Path and click Edit...;
  7. In the Edit environment variable window, click New and paste the folder location where you extracted sqlite-tools-win32-x86-3290000.zip on the C:\ drive.
  8. Optionally you can rename sqlite3.exe to sqlite.exe, so you can type only sqlite command. Or you can duplicate sqlite3.exe and rename it to sqlite.exe to have access to both versions for compatibility.
@danieldogeanu
danieldogeanu / ExcludeDirectoriesWinSCP.md
Created August 7, 2019 19:16
How to exclude certain directories on FTP transfer in WinSCP.

To exclude directories in WinSCP open the application and do the following:

  1. From the Login window click Tools > Preferences...;
  2. In the Preferences window navigate to Transfer section in the left side;
  3. From the right side click Add... button;
  4. In the Add transfer settings preset window, add a title for your preset in the Preset description field;
  5. Make sure that Binary (archives, doc, ...) is selected under the Transfer mode section;
  6. Under the Other section, at the end of the File mask: field, click the Edit... button;
  7. Add your files to exclude in the Exclude files: field, one per line;
  8. Add your directories to exclude in the Exclude directories: field, one per line;
  9. Click OK to close the window and to add the file masks;
@danieldogeanu
danieldogeanu / ListGlobalNPMPackages.md
Created August 5, 2019 19:52
List all global npm packages.

npm list -g --depth 0

@danieldogeanu
danieldogeanu / DeleteBranches.md
Last active September 1, 2018 01:32
How to delete branches from GitHub/BitBucket.
  1. If the branches are only local, you can use -d if the branch has been merged:

    git branch -d branch-name

  2. If the branch contains code you never plan on mergin, use -D instead:

    git branch -D branch-name

  3. If the branch is in the upstream repo you can remove the remote reference by:

@danieldogeanu
danieldogeanu / MergeBranchToMaster.md
Last active September 1, 2018 01:34
How to merge a branch into master on GitHub/BitBucket.

git checkout master

git pull origin master

git merge yourBranch

git push origin master

Keybase proof

I hereby claim:

  • I am danieldogeanu on github.
  • I am danieldogeanu (https://keybase.io/danieldogeanu) on keybase.
  • I have a public key ASCsAwthxKe2hoVBGnVC4NlpHaz_IBnII0nFe2J-DiHvFwo

To claim this, I am signing this object:

@danieldogeanu
danieldogeanu / FixPathTooLongGradle
Created July 4, 2018 09:40
How to fix Gradle "file path too long" error on Windows 10.
// In the build.gradle file, at the project root, add the `buildDir` with the path to a directory on the root of the drive you are using. For example `D:/Builds/`.
allprojects {
buildDir = "D:/Builds/${rootProject.name}/${project.name}" // Fix for PATH TOO LONG error.
repositories {
jcenter()
}
}
@danieldogeanu
danieldogeanu / RecentProjectsAndroidStudio
Created May 6, 2018 16:09
Where the paths of Recent Projects is stored in Android Studio 3.1.x on Windows 10.
`C:\Users\<USERNAME>\.AndroidStudio3.1\config\options\recentProjects.xml`
@danieldogeanu
danieldogeanu / ScaleAndroidStudioOnSecondaryDisplay
Last active May 6, 2018 14:21
Scale Android Studio 3.1.1 on Secondary Display on Windows 10 (HiDPI)
Steps for Windows 10:
1. Open Android Studio and go to `Help > Edit Custom Properties...` from the menu.
2. In the `idea.properties` file that opens, add `sun.java2d.uiScale.enabled=true` (without backticks or semicolon at the end).
3. Save the file and restart Android Studio.
The point is this: With JRE scaling disabled, when you move IDEA to the secondary screen, scaling is done by MS Windows.
It simply scales down (or up, depending on your monitor scale) the whole window resulting in that you see the blurred content.