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
# Add repository | |
yum-config-manager --add-repo http://repo.cloudhike.com/sublime2/fedora/sublime2.repo | |
# Enable repository | |
yum-config-manager --enable | |
# Installin Sublime Text 2 | |
yum install sublime-text | |
#Tested on Fedora 17, 18 |
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
sudo chcon -R -t httpd_sys_content_rw_t 'thisfolfer' |
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
# Clone from the remote repository | |
[other ~]$ git clone ssh://[user@]host/~/project.git |
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
// After process, execute the PHP | |
$aux_date = implode("-", array_reverse(explode("/", date('d/m/Y')))); | |
// Or the JS | |
var aux_date = $('.date').val().split('/').reverse().join('-'); |
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
public function MakeSlug($str) { | |
$str = htmlentities($str, ENT_COMPAT, 'UTF-8'); | |
$str = preg_replace('/&([a-zA-Z])(uml|acute|cedil|grave|circ|tilde);/', '$1', $str); | |
$str = preg_replace('/[^a-zA-Z]/', '-', strtolower($str)); | |
$str = substr($str, -1) == '-' ? str_replace('--', '-', substr($str, 0,-1)) : str_replace('--', '-', $str); | |
return html_entity_decode($str); | |
} |
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"})); |
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
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
git checkout-index -a -f --prefix=/path/to/your/folder/ | |
# The ending forward slash is very important! |