Skip to content

Instantly share code, notes, and snippets.

View danieldogeanu's full-sized avatar

Daniel Dogeanu danieldogeanu

View GitHub Profile
@danieldogeanu
danieldogeanu / RecoverReducedUSBStorage
Created February 23, 2017 20:55
Recover reduced USB storage.
- Open CMD and type 'diskpart';
- Type 'list disk' and find the number of your USB flash disk;
- Type 'select disk x' (where x is your disk number);
- Type 'clean' to remove all partitions;
- Type 'create partition primary' to create a new primary partition.
@danieldogeanu
danieldogeanu / BringBackOpenCMDHere
Created April 30, 2017 00:56
Bring back 'Open command window here' in context menu when pressing Shift key, on Windows 10.
1. Open the Registry Editor (Win+R and type regedit);
2. Navigate to:
HKEY_CLASSES_ROOT\Directory\Background\shell\cmd
HKEY_CLASSES_ROOT\Directory\shell\cmd
HKEY_CLASSES_ROOT\Drive\shell\cmd
3. Gain registry key permissions:
- right click on the key (folder in the left side);
- select Permissions...;
@danieldogeanu
danieldogeanu / SyncFoldersOutsideOneDrive.md
Last active May 28, 2024 08:27
Sync Folders Outside OneDrive
  1. Find the Address of the folder you want to be synced. (ie. G:\Games\). Copy it.

  2. Find the OneDrive location you wish for it to sync to. Hold shift and right click. On the context menu, click open command window here.

  3. In the command window type mklink /j "YourCustomFolderName" G:\Games\ (G:\Games\ is the address of your original folder).

This is like a shortcut that tells any programs that look there to look at another directory. This will sync anything inside the address you tell it to the folder created in a onedrive directory


@danieldogeanu
danieldogeanu / AfterInstallingNode
Last active September 14, 2017 19:36
After installing Node.js, install the following globally, before installing local repositories for development. This will prevent errors when installing SASS. Once installed, validate Python is found in the correct folder: `C:\Users\{yourusername}\.windows-build-tools\python27\python.exe `
npm install --global --production windows-build-tools
npm install --global node-gyp
@danieldogeanu
danieldogeanu / ConfigGitLineEndings
Last active March 11, 2018 05:55
Force Git to use LF line endings.
git config core.eol lf
git config core.autocrlf input
@danieldogeanu
danieldogeanu / git checkout-all-branches.sh
Created March 16, 2018 07:23
git checkout-all-branches
#!/bin/bash
#Whenever you clone a repo, you do not clone all of its branches by default.
#If you wish to do so, use the following script:
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
@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.
@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 / 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()
}
}

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: