Skip to content

Instantly share code, notes, and snippets.

View pabloselin's full-sized avatar

Pablo Selín Carrasco Armijo pabloselin

View GitHub Profile
@pabloselin
pabloselin / 0_reuse_code.js
Created June 1, 2014 12:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@pabloselin
pabloselin / pdf2jpg.php
Created June 2, 2014 14:34
Cómo convertir la primera página de un PDF a jpg
<?php
function apie_pdfpagetojpg($attchid) {
//Verificar que se trata de un pdf
$mimtype = get_post_mime_type($attchid);
//Chequeos previos
//Obtener la ruta y el nombre del archivo
$archivo=get_attached_file($attchid);
$uploadsdir= wp_upload_dir();
//Lo dejamos en un directorio separado de los uploads vía admin para mejor diferenciación, y además, es más práctico si luego queremos convertir esta función en un plugin
$img_path = $uploadsdir['basedir'] . '/pdfsnaps';
@pabloselin
pabloselin / customtax.php
Created June 2, 2014 19:54
Create custom taxonomy
<?php
function sgc_createcustomtax() {
$labels = array(
'name' => 'Temas',
'singular_name' => 'Tema',
'search_items' => 'Buscar temas',
'popular_items' => 'Temas más populares',
'all_items' => 'Todos los Temas',
'parent_item' => null,
'parent_item_colon' => null,
import React, { Component } from "react";
import DownloadButton from "./mini/DownloadButton.js";
import {
VictoryChart,
VictoryBar,
VictoryGroup,
VictoryLegend,
VictoryLabel,
VictoryAxis,
VictorySharedEvents,
import React, { Component } from "react";
import DownloadButton from "./mini/DownloadButton.js";
import {
VictoryPie,
VictoryLegend,
VictorySharedEvents,
VictoryLabel,
VictoryContainer,
VictoryGroup,
Point
<?php
//Llamado a actores de alcance territorial regional
$args = array(
'post_type' => 'actor',
'numberposts' => -1,
'tax_query' => array(
array(
'taxonomy' => 'alcance_territorial',
@pabloselin
pabloselin / infoapic80.md
Last active August 28, 2020 20:05
Información APIs c80.cl