This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$a = ['a' => '100', 'b' => '200', 'c' => '300']; | |
$b = ['100' => 'a', '200' => 'b', '300' => 'c']; | |
dump($b); | |
//array:3 [ | |
// 100 => "a" | |
// 200 => "b" | |
// 300 => "c" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew tap homebrew/dupes | |
brew tap josegonzalez/homebrew-php | |
brew install php54 --with-mysql --with-pgsql --with-xdebug | |
brew install php54-intl | |
brew install php54-mcrypt | |
export PATH="$(brew --prefix josegonzalez/php/php54)/bin:$PATH" in your ~/.zshrc | |
Utf terminal problem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
USER=$(whoami) | |
APACHE_USER=$(ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {print $1}') | |
sudo chmod +a "$USER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs | |
sudo chmod +a "$APACHE_USER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs | |
echo "app/cache & app/logs been properly chmod'ed for $USER and $APACHE_USER" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
set_error_handler('undefinedIndexHandler'); | |
function undefinedIndexHandler($errno, $errstr, $errfile, $errline, $errcontext) | |
{ | |
if (!preg_match('/Undefined index/', $errstr)) { | |
return; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Angular App</title> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> | |
<style type="text/css"> | |
input {margin:10px ;} | |
input.ng-invalid.ng-dirty { | |
border-color: red; | |
} | |
input.ng-valid.ng-dirty { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MIT License | |
=========== | |
Copyright (c) 2009–2011 | |
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 | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web/bundles/ | |
app/bootstrap* | |
app/cache/* | |
app/logs/* | |
vendor/ | |
app/config/parameters.ini |