Skip to content

Instantly share code, notes, and snippets.

Egoitz Gonzalez aldakur

Block or report user

Report or block aldakur

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
View labur.js
jQuery(document).ready(function($) {
jQuery("#button_polr_get_url").click(function(){
var doc_pathname = '';
var suwp_pathname = document.location.pathname.split('/')[1];
// add the path element, if necessary
if( suwp_pathname == 'wp-admin' ) {
doc_pathname = '/wp-admin/admin-ajax.php';
} else {
@aldakur
aldakur / laburURL.sh
Created Mar 24, 2017
Script to use labur.eus service in console [bash]
View laburURL.sh
curl --request GET 'https://labur.eus/api/v2/action/shorten?key=YOUR_API_KEYd&url=URL_YOU_WANT_TO_SHORTEN&is_secret=false'; echo '\n'
@aldakur
aldakur / laburURL.py
Last active Mar 24, 2017
Script to use labur.eus services in console [Python]
View laburURL.py
import requests
res = requests.get('https://labur.eus/api/v2/action/shorten?key=YOUR_API_KEYd&url=URL_YOU_WANT_TO_SHORTEN&is_secret=false')
shortened_url = res.text
print shortened_url
View wordpress_tips.php
// BUCLE PARA POSTS
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
// Aqui codigo que se ejecutara cuando se encuentren articulos
<?php endwhile; else: ?>
// Aqui codigo que se ejecutara cunado no se encuentren articulos
<?php endif; ?>
// Para poder agregar plugins a nuestro tema es necesario las siguientes dos funciones.
// También hace que se vea la barra de arriba cuando estamos logeados en el blog
// header.php en el <head> antes de </head>
@aldakur
aldakur / ChangeTextViewSizeWithAsyncActivity.java
Created Aug 29, 2016
Change TextView Size using Asynctask
View ChangeTextViewSizeWithAsyncActivity.java
package service.webservice.facilito.codigo.com.ejemplocfwebservices;
import android.content.Intent;
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
@aldakur
aldakur / TaskInParallelModeExample.java
Last active Jul 18, 2016
Run multiple threads in parallel mode and control the status with a progress bar
View TaskInParallelModeExample.java
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
import java.util.ArrayList;
@aldakur
aldakur / PorgressBarExample.java
Created Jul 18, 2016
Writing in a TextView numbers from 1 to 10, and display the progress bar during the process
View PorgressBarExample.java
import android.os.AsyncTask;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.Button;
import android.widget.ProgressBar;
import android.widget.TextView;
public class PorgressBarExample extends AppCompatActivity {
@aldakur
aldakur / ThreadChangesInterface.java
Last active Jul 15, 2016
Thread that changes the user interface in the same (primary) thread
View ThreadChangesInterface.java
// [EU] Hari berdinean (app-aren hari nagusia) interfaze aldaketa burutzeko. Kasu honetan
// TextView baten aldaketa
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
@aldakur
aldakur / ThreadSleepyhead.java
Last active Jul 15, 2016
This class contain a thread that run a log every 3 seconds
View ThreadSleepyhead.java
// [ES] Hilo dormilón
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class ThreadSleepyhead extends AppCompatActivity {
@aldakur
aldakur / ThreadSleepyheadIndependentClass.java
Last active Jul 15, 2016
This file contain a thread as class that run a log every 3 seconds
View ThreadSleepyheadIndependentClass.java
// [ES] Hilo dormilón
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
public class ThreadSleepyheadIndependentClass extends AppCompatActivity {
You can’t perform that action at this time.