This file contains hidden or 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 | |
/* | |
* $result should be the return of a function of line "fetch_assoc", returned of a query on the data base | |
*/ | |
if(!empty($result)) { | |
$filename = date('Ymd').'.csv'; | |
This file contains hidden or 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
(function ($) { | |
$.fn.limit = function (options) { | |
var defaults = { | |
limit : 200, | |
result : false, | |
alertClass : false | |
}, options = $.extend(defaults, options); | |
return this.each(function () { | |
var characters = options.limit; |
This file contains hidden or 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
mysql -u user -p database -h mysql.example.com --default-character-set=utf8 < import.sql |
This file contains hidden or 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
<VirtualHost *:80> | |
ServerName example.local | |
DocumentRoot /path/to/example/public | |
SetEnv APPLICATION_ENV "development" | |
<Directory /path/to/example/public> | |
DirectoryIndex index.php | |
AllowOverride All | |
Order allow,deny |
This file contains hidden or 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
(function($) { | |
$.fn.defaultValue = function() { | |
$(this).each(function(i, el) { | |
var actualValue, | |
$el = $(this), | |
defaultValue = el.value; | |
$el.on('focus', function() { | |
actualValue = $el.val(); | |
This file contains hidden or 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
(function($){ | |
$.fn.reset = function () { | |
$(this).each (function() { | |
this.reset(); | |
}); | |
} | |
})(jQuery); |
This file contains hidden or 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
git checkout-index -a -f --prefix=/path/to/your/folder/ | |
# The ending forward slash is very important! |
This file contains hidden or 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
find . -name ".svn" -exec rm -rf {} \; |
This file contains hidden or 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 | |
$config = array( | |
'ssl' => 'tls', | |
'port' => 587, | |
'auth' => 'login', | |
'username' => '[email protected]', | |
'password' => 'myPassword' | |
); | |
$transport = new Zend_Mail_Transport_Smtp('smtp.gmail.com', $config); |
This file contains hidden or 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 var_dump snipper for NetBeans | |
echo '<pre>'; | |
die(var_dump(${VARIABLE variableFromPreviousAssignment default="$variable"})); |
OlderNewer