Skip to content

Instantly share code, notes, and snippets.

View danieldogeanu's full-sized avatar

Daniel Dogeanu danieldogeanu

View GitHub Profile
@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 / 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 / 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 / SyncFoldersOutsideOneDrive.md
Last active May 20, 2024 12:34
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 / 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 / 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 / ChangeWAMPRootDirectory
Created February 23, 2017 11:05
Change WAMP Root Directory
- Go to 'C:\wamp64\bin\apache\apache2.4.18\conf', open 'httpd.conf' and change the DocumentRoot and <Directory> paths.
- Next, go to 'C:\wamp64\bin\apache\apache2.4.18\conf\extra', open 'httpd-vhosts.conf' and do the same thing as above.
@danieldogeanu
danieldogeanu / DisableNativeDateTimeInputs.js
Last active December 17, 2016 05:26
An alternative to disable native Date/Time inputs, with the help of Modernizr.
// Disable Native Date/Time Inputs
var dateInputs = [
'input[type="date"]',
'input[type="datetime"]',
'input[type="datetime-local"]',
'input[type="month"]',
'input[type="week"]',
'input[type="time"]'
];
@danieldogeanu
danieldogeanu / DisableSpinnerAndNativeCalendarDropdown.scss
Created December 17, 2016 05:20
Disable Spinner and Native Calendar Dropdown
// Disable Spinner and Native Calendar Dropdown
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"] {
appearance: textfield;
&::-webkit-calendar-picker-indicator {
display: none;
@danieldogeanu
danieldogeanu / WAMP Pretty Permalinks
Created January 4, 2015 01:42
Get WAMP server to work with pretty permalinks on WordPress