Skip to content

Instantly share code, notes, and snippets.

View cristiancorreau's full-sized avatar

Cristian Correa cristiancorreau

View GitHub Profile
@cristiancorreau
cristiancorreau / designer.html
Last active August 29, 2015 14:11
designer
<link rel="import" href="../topeka-elements/category-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
// Declaración de un ArrayList de "String". Puede ser de cualquier otro Elemento u Objeto (float, Boolean, Object, ...)
ArrayList<String> gatitosArrayList = new ArrayList<String>();
// Añade el elemento(un gatito) al ArrayList
gatitosArrayList.add("Benito");
// Añade el elemento al ArrayList en la posición 'n'
gatitosArrayList.add(n, "Don Gato");
@cristiancorreau
cristiancorreau / gist:f9e827b977caebb187ca
Last active August 29, 2015 14:23
MainActivity.java - P10I11_U3_Ksoap
package cl.inacap.ksoapejemplo;
import java.util.concurrent.ExecutionException;
import cl.inacap.clases.WSBackgroundConnection;
import com.example.ksoapejemplo.R;
import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;
import java.text.DecimalFormat;
@cristiancorreau
cristiancorreau / en.yml
Created December 12, 2012 01:27 — forked from scastill/en.yml
es:
# Used in distance_of_time_in_words(), distance_of_time_in_words_to_now(), time_ago_in_words()
datetime:
distance_in_words:
half_a_minute: "hace un minuto"
less_than_x_seconds:
one: "hace menos de 1 segundo"
other: "hace menos de %{count} segundos"
x_seconds:
one: "1 segundo"
@cristiancorreau
cristiancorreau / cambiohorachile
Created March 18, 2013 02:46
Cambio de Hora de Servidor Linux en Chile
#!/bin/bash
echo "Actualizando timezone"
wget ftp://ftp.iana.org/tz/tzdata-latest.tar.gz
tar xvfz tzdata-latest.tar.gz
zic southamerica
sudo mv /etc/localtime /etc/localtime.old
sudo ln -s /usr/share/zoneinfo/America/Santiago /etc/localtime
@cristiancorreau
cristiancorreau / image_uploader.rb
Created April 1, 2013 15:58
Ejemplo de Uploader para RedactorRails
# encoding: utf-8
class ImageUploader < CarrierWave::Uploader::Base
# Include RMagick or MiniMagick support:
include CarrierWave::RMagick
# include CarrierWave::MiniMagick
# Include the Sprockets helpers for Rails 3.1+ asset pipeline compatibility:
include Sprockets::Helpers::RailsHelper
@cristiancorreau
cristiancorreau / remove-gf-divi.php
Created June 6, 2017 23:03 — forked from mkrdip/remove-gf-divi.php
Remove Google Fonts from Divi
<?php
function wpse_dequeue_google_fonts() {
wp_dequeue_style( 'divi-fonts' );
}
add_action( 'wp_enqueue_scripts', 'wpse_dequeue_google_fonts', 20 );
@cristiancorreau
cristiancorreau / .js
Created June 12, 2017 01:48
Wordpress Divi Theme : Traducir Divi botón Read More
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("button.et_pb_contact_submit.et_pb_button").text('Enviar');
});
</script>
@cristiancorreau
cristiancorreau / Translate Buttons Divi
Last active June 12, 2017 02:17
Wordpress Divi Theme : Traducir Divi botón Read More
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("button.et_pb_contact_submit.et_pb_button").text("Enviar");
jQuery("a.et_pb_more_button.et_pb_button").text("Seguir leyendo");
jQuery("input#submit.submit.et_pb_button").val("Enviar comentario");
});
</script>
@cristiancorreau
cristiancorreau / update_domain_wp.sql
Last active July 17, 2017 00:23
Update links site Wordpress change domain
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');