Skip to content

Instantly share code, notes, and snippets.

@enlacee
enlacee / Imagick-code.php
Created April 24, 2019 04:34
Crear imagen proporcional con Imagick LIBRARY
<?php
/*
// BASIC EXAMPLE (INSPIRATION)
// comando usado en LINUX con imagemagick instalado
// convert sansung.png -thumbnail 500x500 -background black -gravity center -extent 500x500 end.jpg
header('Content-type: image/jpeg');
$image = new Imagick('image.jpg');
@enlacee
enlacee / script-subir-archivos-cambiados.sh
Created April 8, 2019 15:47
subir archivos al servidor
#!/bin/bash
ult_comt=$1;
pri_comt=$2;
dir_local=$3;
dir_remot=$4;
if [ $# -lt 4 ]; then
echo "use: <ult-cod-commit> <pri-cod-commit> <dir_local> <dir_remot>";
@enlacee
enlacee / cuqi-pagos.php
Created January 28, 2019 22:54
Crear cargos posteriores
<?php
public function ajax_paymentfitnes() {
global $current_user;
get_currentuserinfo();
// Check parameters
$message = isset( $_POST['card_token'] ) ? $_POST['card_token'] : false;
$dataPOST = $_POST;
$culqui_customer_id = get_the_author_meta( 'culqui_customer_id', $current_user->ID );
@enlacee
enlacee / menu-html-css-responsive.html
Last active April 30, 2018 02:08
menu with html y css responsive
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class='bbt-menu'>
<nav>
<label for='drop' class='toggle'>Menu <span>&#9776;</span></label>
@enlacee
enlacee / menu-responsive.html
Created April 29, 2018 22:25
basic menu responsive
<!DOCTYPE html>
<html>
<head>
<title>h22</title>
</head>
<body>
<nav id="nav" role="navigation">
<a href="#nav" title="Show navigation" href="javascript:void(0);" onclick="myFunction()">Show navigation &#9776;</a>
<a href="#" title="Hide navigation" href="javascript:void(0);" onclick="myFunction2()">Hide navigation &times;</a>
<ul>
@enlacee
enlacee / 02.text
Created March 20, 2018 03:15
02.text
def insertarAlInicio(nuevoValor)
nuevoNodo = [nuevoValor, nil] # crear un nodo nuevo
# crear NODO
if @inicio == nil
@inicio = nuevoNodo
else
nuevoNodo[1] = @inicio
@inicio = nuevoNodo
@enlacee
enlacee / gist:9ecb8372415c00bb65c3df6225df4442
Created March 13, 2018 03:19
lista-enlazada.agregar.al.inicio.rb
def printt()
a = [nil, 3, nil]
b = [nil, 5, nil]
c = [nil, 10, nil]
nuevo = [nil, 50, nil] # crear un nodo nuevo
a[2] = b
b[0] = a
b[2] = c
c[0] = b
@enlacee
enlacee / example.php
Created February 23, 2018 05:47 — forked from ralphschindler/example.php
Zend\Db\Sql\Select example usage
<?php
use Zend\Db\Sql\Select;
// basic table
$select0 = new Select;
$select0->from('foo');
// 'SELECT "foo".* FROM "foo"';
FROM phusion/baseimage:0.9.15
MAINTAINER picodotdev <pico.dev@gmail.com>
ENV HOME /root
RUN apt-get update -q
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
RUN echo 'root:$6$l/PahbyY$jFhqIAuvHeK/GwjfT71p4OBBkHQpnTe2FErcUWZ8GIN1ykdI7CgL05Jkk7MYW6l.0pijAlfoifkQnLpaldEJY0' | chpasswd -e