Skip to content

Instantly share code, notes, and snippets.

View halilim's full-sized avatar

Halil Özgür halilim

View GitHub Profile
@halilim
halilim / gae_serve_php.bat
Created June 18, 2013 06:55
Google App Engine for PHP Local Dev Server Shortcut For Windows
REM Python Install Path (e.g. C:\Python2.7) should be in your %PATH%, or you should provide a full path instead of "python"
REM Put this in some folder that is in your %PATH% as well
REM Run this as "gae_serve_php path\to\project", if already in the project dir "gae_serve_php ."
python "<PATH TO GAE PHP SDK>\google_appengine\dev_appserver.py" --php_executable_path="<PATH TO PHP 5.4>\php-cgi.exe" "%1"
@halilim
halilim / phar.bat
Created March 23, 2013 10:43
Windows phar shortcut
@REM 1) Put this file in your PHP bin folder (e.g. ...\Program Files\PHP)
@REM 2) Put .phar files in a subfolder phar\
@REM 3) Call .phar's like: phar php-cs-fixer --etc --etc
@REM Currently doesn't support more than 8 arguments to the phar, since I couldn't find an easy way to have shift(%*)
@php %~dp0phar\%1.phar %2 %3 %4 %5 %6 %7 %8 %9
@halilim
halilim / git-discard-newline-only-changes.sh
Created March 12, 2013 16:19
Discards files with only newline changes. Main idea from http://stackoverflow.com/questions/12092714/how-to-git-reset-hard-everything-but-4-files NOTE: Test it first without checking out actually!!!
# Windows: doesn't work in Git Bash, use Cygwin (with cd "D:\etc..." first)
for file in $(git diff --ignore-space-at-eol --stat=1000,1000|cut -d' ' -f2|head -n -1); do git add $file; done && git checkout .
@halilim
halilim / git diff without newline changes
Last active December 10, 2015 03:18
Since `git diff --ignore-space-at-eol --name-only` doesn't work (http://git.661346.n2.nabble.com/git-diff-ignore-space-at-eol-issue-td7573503.html) this is the command that gets closest to getting only the file names...
git diff --ignore-space-at-eol --stat