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
# Instala paquetes necesarios | |
sudo apt-get install postgresql | |
sudo apt-get install postgresql-server-dev-9.1 | |
sudo apt-get install python-pip | |
sudo apt-get install python-dev | |
sudo pip install virtualenv | |
sudo pip install virtualenvwrapper | |
# Crea y activa entorno virtual | |
virtualenv <nombre_proyecto> |
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
# Read about how to use .gitignore: http://h5bp.com/ae | |
# Numerous always-ignore extensions | |
*.diff | |
*.err | |
*.orig | |
*.log | |
*.rej | |
*.swo | |
*.swp |
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
UPDATE wp_options SET option_value = replace(option_value, 'http://old.tld', 'http://new.tld') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'http://old.tld','http://new.tld'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'http://old.tld', 'http://new.tld'); |
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 | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
query_posts($query_string .'&posts_per_page=12&paged=' . $paged); | |
?> |
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 | |
/* Designer randomnes */ | |
if($es_texto == 0 && $texto == 0){ | |
$es_texto = rand(0, 1); | |
}else{ | |
$es_texto = 0; | |
} | |
if($imagen == 2){ | |
$es_texto = 1; | |
} |
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 . -type d -print0 | xargs -0 chmod 0755 # For directories | |
find . -type f -print0 | xargs -0 chmod 0644 # For files |
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 grub2-mkconfig -o /boot/grub2/grub.cfg |
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 | |
# CI Reference: http://codeigniter.com/user_guide/libraries/file_uploading.html | |
# SendGrid Reference: http://docs.sendgrid.com/documentation/api/parse-api-2/ | |
public function input(){ | |
//file upload configuration | |
$config['upload_path'] = './uploads/'; | |
$config['allowed_types'] = 'gif|jpg|png|jpeg'; | |
$config['max_size'] = '8192'; | |
$config['max_width'] = '0'; |
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 | |
if (is_uploaded_file($HTTP_POST_FILES['attachmentx']['tmp_name'])) { | |
copy($HTTP_POST_FILES['attachmentx']['tmp_name'], $HTTP_POST_FILES['attachmentx']['name']); | |
$subio = true; | |
} | |
if($subio) { | |
echo "El archivo subio con exito"; | |
} else { | |
echo "El archivo no cumple con las reglas establecidas"; |
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 $output = shell_exec('git fetch --all && git reset --hard origin/prod'); ?> | |
<style> | |
body{ | |
background-color: #1A1A1A; | |
color:#fff; | |
} | |
pre{ | |
padding:20px; | |
} |