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 / align_scan.py
Created July 27, 2019 00:08 — forked from smeschke/align_scan.py
Aligns a scanned document to find optimal rotation
import cv2
import numpy as np
src = 255 - cv2.imread('/home/stephen/Desktop/I7Ykpbs.jpg',0)
scores = []
h,w = src.shape
small_dimention = min(h,w)
src = src[:small_dimention, :small_dimention]
@gogl92
gogl92 / main.js
Created June 23, 2019 22:17 — forked from ahmedengu/main.js
Using simple-parse-smtp-adapter with cloud code, Parse Server, https://github.com/lcortess/simple-parse-smtp-adapter
var sendSmtpMail = require('simple-parse-smtp-adapter')({
fromAddress: 'your@sender.address',
user: 'email@email.com',
password: 'AwesomePassword',
host: 'your.smtp.host',
isSSL: true,
port: 465,
emailField: 'email'
}).sendMail;
@gogl92
gogl92 / lamp.sh
Last active June 4, 2018 17:04 — forked from aamnah/lamp.sh
Bash script to install Apache, MySQL and PHP as well as PHPMyAdmin and some tweaks. For Debian and Ubuntu. To run, copy the script to the server and run ``bash lamp.sh``
#!/bin/sh
#######################################
# Bash script to install an AMP stack and PHPMyAdmin plus tweaks. For Debian based systems.
# Written by @AamnahAkram from http://aamnah.com
# In case of any errors (e.g. MySQL) just re-run the script. Nothing will be re-installed except for the packages with errors.
#######################################
#COLORS
@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);
@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: "