Skip to content

Instantly share code, notes, and snippets.

View radabass's full-sized avatar

Ra radabass

  • Galicia
View GitHub Profile
@radabass
radabass / Git chmod disable for Windows.sh
Created November 12, 2019 11:24
Remove git chmod changes in all the git repositories inside a project for Windows
## This commands need to be executed on git bash or other linux terminal.
#Remove svn old versions for the entire project (in site root folder execute):
find -name ".svn" | xargs /bin/rm -rf
#Avoids problem with crlf, spacings and chmod under windows10
git config --global core.filemode false
#Removes locally for one repository
git config --unset core.filemode
@radabass
radabass / chrome_ajax_reload_fix.js
Last active May 19, 2017 08:20
Chrome scroll FIX for ajax reload (wrong position after ajax replace)
/*
* NEXT FUNCTION FIXES CHROME ERRATIC SCROLL IN AJAX RELOAD.
* Using sessionStorage will only affect to current tab.
*/
var currentPageY,
varPageY = 'page_y';
try {
// Scroll on AJAX reload.
currentPageY = sessionStorage.getItem(varPageY);
if (typeof currentPageY === 'undefined') {
@radabass
radabass / Vagrant-port-forward-to-host.md
Last active September 23, 2023 08:38
Vagrant port 80 443 forwarding to HOST machine OSX El Capitan

El Capitan OSX Vagrant port forwarding rules to use privileged ports 80 and 443

Due to the OSX limitations in ports below 1024, in order to use them without running as root the virtualbox headless you can do the following workaround, (remember the command ipfw is deprecated on El Capitan)

In the Vagrant file use ports over 1024, for instance change 80 and 443 to 8080 and 8043.

  # Apache
  config.vm.network "forwarded_port", guest: 80, host: 8080