Skip to content

Instantly share code, notes, and snippets.

View rodrigobertin's full-sized avatar

RNB Developer rodrigobertin

View GitHub Profile
<?php
/*
* Creating a function to create our CPT
*/
function custom_post_type() {
// Set UI labels for Custom Post Type
$labels = array(
'name' => _x( 'Movies', 'Post Type General Name', 'twentythirteen' ),
@rodrigobertin
rodrigobertin / unison_sites.prf
Created October 18, 2017 23:37
Unison Sites
# Unison preferences file
# roots
root=/Users/rnb/Sync/SITES
root=/Volumes/SITES
# for mirroring
force=/Users/rnb/Sync/SITES
# to sync fat32
config.vm.synced_folder "./", "/vagrant", id: "vagrant-root",
owner: "vagrant",
group: "www-data",
mount_options: ["dmode=775,fmode=664"]
@rodrigobertin
rodrigobertin / instal_2.sh
Last active August 23, 2019 17:07
Install Ubuntu 16.04 LAMP
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get -y upgrade
export LC_ALL=C
#esenciales
sudo apt-get install -y build-essential
sudo apt-get -y install nano vim htop
sudo locale-gen en_US.UTF-8
<?php
function favicons_site($folder='/img/icons'){
$location=get_template_directory_uri().$folder;
$rend="<link rel=\"shortcut icon\" href=\"{$location}/favicon.ico\" type=\"image/x-icon\"/>
<link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"{$location}/apple-touch-icon-57x57.png\">
<link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"{$location}/apple-touch-icon-60x60.png\">
<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"{$location}/apple-touch-icon-72x72.png\">
<link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"{$location}/apple-touch-icon-76x76.png\">
@rodrigobertin
rodrigobertin / logerror.php
Created November 1, 2017 15:57
Logs error simple file
<?php
$archivoLog = __DIR__ . "/php-error.log";
ini_set( "log_errors",1 );
ini_set( "error_log",$archivoLog );
error_reporting( - 1 );
wget -q -O – https://example.com/wp-cron.php >/dev/null 2>&1
s3cmd put * s3://rnb/SITIOS/ --recursive --acl-public
@rodrigobertin
rodrigobertin / upgrade.sh
Created January 4, 2018 16:27
Upgrade cloud9 Space
mysql-ctl install
phpmyadmin-ctl install
sudo add-apt-repository ppa:ondrej/php -y
sudo apt-get update -y
sudo apt-get install php7.0-curl php7.0-cli php7.0-dev php7.0-gd php7.0-intl php7.0-mcrypt php7.0-json php7.0-mysql php7.0-opcache php7.0-bcmath php7.0-mbstring php7.0-soap php7.0-xml php7.0-zip -y
sudo mv /etc/apache2/envvars /etc/apache2/envvars.bak
sudo apt-get remove libapache2-mod-php5 -y
@rodrigobertin
rodrigobertin / IdiormBasic.php
Created January 24, 2018 14:03
Idiomr Basi conect
ORM::configure([
'connection_string' => 'mysql:host=localhost;dbname=tester',
'username' => 'root',
'password' => '1234'
]);
ORM::configure('driver_options', array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));