These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.
Install Mcrypt using Homebrew
# PHP 7
git clean -f | |
If you want to also remove directories, run git clean -f -d. | |
If you just want to remove ignored files, run git clean -f -X. | |
If you want to remove ignored as well as non-ignored files, run git clean -f -x. | |
Note the case difference on the X for the two latter commands. | |
If clean.requireForce is set to "true" (the default) in your configuration, then unless you specify -f nothing will actually happen, with a recent enough version of git. |
These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.
Install Mcrypt using Homebrew
# PHP 7
function tab | |
set -l ascmd "osascript -e 'tell application \"Terminal\" to activate' -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down'" | |
for arg in $argv | |
set ascmd "$ascmd -e 'tell application \"Terminal\" to do script \"$arg\" in selected tab of the front window'" | |
end | |
set -l ascmd "$ascmd;" | |
eval $ascmd | |
end |
angular.module("myApp").directive("autoGrow", function(){ | |
return function(scope, element, attr){ | |
var update = function(){ | |
element.css("height", "auto"); | |
var height = element[0].scrollHeight; | |
if(height > 0){ | |
element.css("height", height + "px"); | |
} | |
}; | |
scope.$watch(attr.ngModel, function(){ |
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2013 Thom Seddon | |
* Copyright (c) 2010 Google | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
function nvm | |
bass source ~/.nvm/nvm.sh ';' nvm $argv | |
end |
git log --oneline --all --graph --decorate $(git reflog | awk '{print $1}') |
git log -G"regex" -p --follow /path/to/file |
<?php | |
/* | |
This function saved my life. | |
found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
by: crvandyke | |
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
*/ | |
$array = json_decode(json_encode($object), true); |
%s;^\(\s\+\);\=repeat(' ', len(submatch(0))/2);g |