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 / 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 / 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:

@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