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
if [ $PWD == $HOME ] | |
then | |
cd Code | |
fi | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\w\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " |
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
// Delete object | |
delete obj.item; | |
// Get index array|object | |
var index = obj.indexOf(item); | |
// is object | |
typeof obj === 'object' | |
// object length |
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
// Print query | |
dd($query->toSql()); | |
dd(DB::getQueryLog()); | |
// Hash | |
php artisan tinker | |
Hash::make('secret'); |
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
- digitalocean, | |
///// LAMP | |
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04 | |
///// composer | |
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-composer-on-ubuntu-14-04 | |
///// phpmyadmin |
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
Very good tutorials | |
-------------------- | |
Jason McCreary, stackoverflow | |
/////// | |
Configuring Apache Virtual Hosts on Mac OS X | |
https://jason.pureconcepts.net/2014/11/configure-apache-virtualhost-mac-os-x/ | |
// Complementation of tutorial |
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
// Edit | |
$ nano ~/.bash_profile | |
export PATH=/usr/local/php5/bin:$PATH; | |
export PATH=/usr/local/mysql/bin:$PATH; | |
export PATH=$HOME/.composer/vendor/bin:$PATH; | |
export PATH=/usr/local/mongodb/bin:$PATH; | |
// Restart |
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
if (!$scope.$$phase) { | |
$scope.$apply(function() { | |
$scope.count = 0; | |
}); | |
} |
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
/** | |
* Change line 4927 | |
*/ | |
Select2.prototype._resolveWidth = function ($element, method) { | |
var WIDTH = /^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i; | |
if (method == 'resolve') { | |
var styleWidth = this._resolveWidth($element, 'style'); | |
if (styleWidth != null) { |
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
/** | |
* Change three lines | |
* | |
/* line 11 */ | |
.select2-container .select2-selection--single { | |
box-sizing: border-box; | |
cursor: pointer; | |
display: block; | |
height: 34px; | |
user-select: none; |
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
$('button').click(function() { | |
if ($('form').smkValidate()) { | |
// Code here | |
} | |
}); |
NewerOlder