Skip to content

Instantly share code, notes, and snippets.

View gogl92's full-sized avatar
🎣
Florida

Luis Gonzalez gogl92

🎣
Florida
View GitHub Profile
@gogl92
gogl92 / gist:ef0b1da85e19e8204984b18d0c8049c3
Created September 12, 2017 18:55
Image Edition in Terminal
change names to a consecutive list 0.jpg .... n.jpg
ls | cat -n | while read n f; do mv "$f" "$n.jpg"; done
Reduce quality
convert -quality 85% 0.jpg 0.jpg
For multiple files
ls | cat -n | while read n f; do convert -quality 85% "$f" "$n.jpg"; done
@gogl92
gogl92 / dropzone-image-upload.markdown
Created October 9, 2017 00:22
Dropzone Image upload
@gogl92
gogl92 / Register CSS Yii2
Last active October 14, 2017 03:52
Easily register CSS in Yii2
<?php
/**
* User: yiqing
* Date: 2014/12/15
* Time: 0:21
*/
namespace year\widgets;
@gogl92
gogl92 / index.html
Created October 17, 2017 05:56
Simple JsBarcode Demo
<svg id="code128"></svg>
<svg id="ean-13"></svg>
<svg id="ean-8"></svg>
<svg id="ean-5"></svg>
<svg id="ean-2"></svg>
<svg id="upc-a"></svg>
<svg id="code39"></svg>
<svg id="itf-14"></svg>
<svg id="msi"></svg>
<svg id="pharmacode"></svg>
@gogl92
gogl92 / index.html
Created October 17, 2017 14:15
Material Live Support
<div class="fabs">
<div class="chat">
<div class="chat_header">
<span id="chat_head">Live Chat</span>
<div class="chat_loader"></div>
<div class="chat_option"><i class="zmdi zmdi-more-vert"></i>
<ul>
<li><span class="chat_color" style="border:solid 5px #2196F3" color="blue"></span></li>
<li><span class="chat_color" style="border:solid 5px #00bcd4" color="cyan"></span></li>
<li><span class="chat_color" style="border:solid 5px #607d8b" color="blue-grey"></span></li>
@gogl92
gogl92 / spanish_pos_sql.sql
Created October 22, 2017 02:30
Database from Spanish POS
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
-- --------------------------------------------------------
--
-- Estructura de tabla para la tabla `albalinea`
--
CREATE TABLE `albalinea` (
`codalbaran` int(11) NOT NULL default '0',
@gogl92
gogl92 / ApiCrypter.java
Created November 21, 2017 13:32
Java PHP encryption
package com.cwilldev.crypt;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
public class ApiCrypter {
@gogl92
gogl92 / wp.sh
Created December 11, 2017 16:06 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@gogl92
gogl92 / install.sh
Created December 17, 2017 09:11
Yii2 Ubuntu PHP packages
sudo apt-get install php-mysqlnd php-pdo php-calendar php-opcache php-ctype php-exif php-fileinfo php-ftp php-gettext php-iconv php-json php-mcrypt php-mysqli php-intl sqlite zip php-zip ksh php-de php-imagick php-gd php-memcached memcached php-sqlite3 php-pgsql
@gogl92
gogl92 / gist:88254e60cd4bc24091c71d08dd3261cb
Created December 31, 2017 20:20 — forked from johnballantyne/gist:4089627
GetMultiCellHeight() script for FPDF
function GetMultiCellHeight($w, $h, $txt, $border=null, $align='J') {
// Calculate MultiCell with automatic or explicit line breaks height
// $border is un-used, but I kept it in the parameters to keep the call
// to this function consistent with MultiCell()
$cw = &$this->CurrentFont['cw'];
if($w==0)
$w = $this->w-$this->rMargin-$this->x;
$wmax = ($w-2*$this->cMargin)*1000/$this->FontSize;
$s = str_replace("\r",'',$txt);
$nb = strlen($s);