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
// 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
# 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
<?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
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
# 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
# Ensure that Apache listens on port 80 | |
Listen 80 | |
# Listen for virtual host requests on all IP addresses | |
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
DocumentRoot /www/example1 | |
ServerName www.example.com |
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
/* Português - Brasil for the jQuery UI date picker plugin. */ | |
/* Written by Danton Dietze ([email protected]). */ | |
jQuery(function($){ | |
$.datepicker.regional['pt-BR'] = { | |
clearText: 'Limpar', | |
clearStatus: '', | |
closeText: 'Fechar', | |
closeStatus: 'Fermer sans modifier', | |
prevText: '<Anterior', | |
prevStatus: '<<Ano anterior', |
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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"draw_minimap_border": true, | |
"draw_white_space": "all", | |
"highlight_line": true, | |
"highlight_modified_tabs": true, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], |