Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Edwind Contreras Richzendy

🎯
Focusing
Block or report user

Report or block Richzendy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Richzendy
Richzendy / clearOS-do.sh
Created Apr 5, 2018
Script to install clearOS on Digital Ocean Droplet
View clearOS-do.sh
#!/bin/bash
# bash script to install clearOS on a Digital Ocean Droplet
# taken from http://wikisuite.org/How-to-upgrade-a-fresh-install-of-CentOS-to-ClearOS
# Prep release and repos
rpm -Uvh http://download2.clearsdn.com/marketplace/cloud/7/noarch/clearos-release-7-current.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ClearOS-7
# Install and upgrade
yum --enablerepo=* clean all
@Richzendy
Richzendy / Reglas_Principales_para_entrar_al_mundo_de_Wordpress.md
Last active Aug 3, 2018
Reglas Principales para entrar al mundo de Wordpress
View Reglas_Principales_para_entrar_al_mundo_de_Wordpress.md
  1. Empieza por leer (lo siento, está en inglés) el diccionario de terminología WordPress de la A-Z: https://premium.wpmudev.org/blog/wordpress-dictionary/
  2. Antes de codear algo en WP, busca un plugin o tema, hay miles de ellos, si no sabes cual usar, pregunta.
  3. Si vas a codear o modificar templates, aprende "Child Themes" y la jerarquia de ejecución https://developer.wordpress.org/themes/basics/template-hierarchy/
  4. Si vas a codear plugins o templates para WP, revisa la API, hay cientos de funciones ya hechas https://codex.wordpress.org/WordPress_APIs por ejemplo, ya WP tiene un sistema de manejo de llamadas AJAX built in ( https://codex.wordpress.org/AJAX_in_Plugins) y un ejemplo más didáctico del uso de AJAX dentro de WP lo puedes encontrar por acá https://premium.wpmudev.org/blog/using-ajax-with-wordpress/
  5. WP parece sencillo y en su estado puro no parece la gran cosa pero puede ser extendido fácilmente, aprende de "custom posts" y "custom fields" para personalizarlo ( advanced custom fields es un
@Richzendy
Richzendy / Get_youtube_playlist_using_XML_RSS_with_dom.php
Last active Aug 29, 2015
Get youtube playlist using XML RSS with DOM PHP
View Get_youtube_playlist_using_XML_RSS_with_dom.php
<?php
/* Get youtube playlist using XML RSS with DOM PHP
* Based on http://bavotasan.com/2010/display-rss-feed-with-php/
*/
?>
<style>
.y-title h3 {
text-align: center;
font-size: 16px;
}
View Create Genesis Menu with the same CSS Styles from Main Menu
// Remove menu from header area (on functions.php)
remove_action( 'genesis_after_header', 'genesis_do_nav' );
// Add New Menu (on functions.php)
register_nav_menu( 'after-header-menu' ,__( 'After Header Navigation Menu' ));
// Declare your new menu and clone styles from Main Menu (on wherever you want, functions.php function or template)
wp_nav_menu( array( 'theme_location' => 'after-header-menu','container' => 'nav', 'container_class' => 'nav-primary','items_wrap' => '<div class="wrap"><ul id="%1$s" class="genesis-nav-menu menu-primary %2$s">%3$s</ul></div>',) );
View Gravity Forms and Fancybox
<div id="voting-form" style="display:none">
<?php echo do_shortcode( '[gravityform id="6" title="false" description="false" ajax="true"]' ) ?>
</div>
<a href="#voting-form" class="fancybox button">Vote Now</a>
@Richzendy
Richzendy / check-availability.php
Last active May 6, 2019
Script to check SoYouStart availability
View check-availability.php
<?php
/*
* Script to check SoYouStart availability based on http://www.tienle.com/2014/09-03/script-check-soyoustart-availability.html
* to help see http://www.richzendy.org/2014/10/05/script-php-para-chequear-y-notificar-disponibilidad-de-servidores-en-soyoustart.html
*/
define('CHECK_URL', 'http://ws.ovh.com/dedicated/r2/ws.dispatcher/getAvailability2');
define('NOTIFICATION_EMAILS', 'YOUR_EMAIL@DOMAIN.COM');
define('SYSTEM_EMAIL', '1'); // 1 = enabled local smtp system
define('MANDRILL', '0'); // 1 = enable email trought mandrill api, require an account on https://mandrillapp.com/
@Richzendy
Richzendy / Add CSS class to children menu item on WordPress
Created Aug 27, 2014
Add CSS class to children menu item on WordPress
View Add CSS class to children menu item on WordPress
// Add CSS class to children menu item on WordPress
add_filter( 'wp_nav_menu_objects', 'add_menu_parent_class' );
function add_menu_parent_class( $items ) {
foreach ( $items as $item ) {
if ( $item->menu_item_parent && $item->menu_item_parent > 0 ) {
$item->classes[] = 'menu-children-item';
}
}
@Richzendy
Richzendy / 0_reuse_code.js
Created Jun 6, 2014
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Richzendy
Richzendy / turpial.desktop.patch
Created Dec 29, 2013
Turpial desktop file patch
View turpial.desktop.patch
--- turpial-3.0-orig/turpial.desktop 2013-12-18 19:59:57.000000000 -0600
+++ turpial-3.0/turpial.desktop 2013-12-22 18:58:21.081595915 -0600
@@ -1,5 +1,5 @@
[Desktop Entry]
-Version=2.0
+Version=1.0
Name=Turpial
Name[es]=Turpial
GenericName=Microblogging client
You can’t perform that action at this time.