Skip to content

Instantly share code, notes, and snippets.

View eddwan's full-sized avatar

Eddwan Hallen eddwan

View GitHub Profile
@eddwan
eddwan / jspdf.plugin.text-align.js
Created July 19, 2017 14:04 — forked from Purush0th/jspdf.plugin.text-align.js
Text alignment for jsPDF 💥
(function (api, $) {
'use strict';
api.writeText = function (x, y, text, options) {
options = options || {};
var defaults = {
align: 'left',
width: this.internal.pageSize.width
}
import java.security.*;
import java.math.*;
public class MD5 {
public static void main(String args[]) throws Exception{
String s="Texto de Exemplo";
MessageDigest m=MessageDigest.getInstance("MD5");
m.update(s.getBytes(),0,s.length());
System.out.println("MD5: "+new BigInteger(1,m.digest()).toString(16));
}
@eddwan
eddwan / gist:cf7e711ce0d72c18737c2adbe6ec2400
Created August 3, 2018 20:23
Check if Current User Is Signed-in or for Data Existence With AngularFire
Promise-Based Solution
If prefer this approach for the elegant async/await syntax.
import { first } from 'rxjs/operators';
isLoggedIn() {
return this.afAuth.authState.pipe(first()).toPromise();
}
@eddwan
eddwan / estados.php
Created November 23, 2018 22:48 — forked from ricardobarantini/estados.php
Array com nome e siglas de estados Brasileiros para select do Codeigniter
$estadosBrasileiros = array(
'AC'=>'Acre',
'AL'=>'Alagoas',
'AP'=>'Amapá',
'AM'=>'Amazonas',
'BA'=>'Bahia',
'CE'=>'Ceará',
'DF'=>'Distrito Federal',
'ES'=>'Espírito Santo',
'GO'=>'Goiás',
--
-- Read only
--
-- Create a group
CREATE ROLE postgres_ro_group;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO postgres_ro_group;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group;
# /config/environments/development.rb
# Gmail configuration
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
address: 'smtp.gmail.com',
port: 587,
domain: 'example.com',
user_name: ENV['EMAIL_USER'],
@eddwan
eddwan / foo.log
Created May 22, 2019 22:33 — forked from ibeex/foo.log
Flask logging example
A warning occurred (42 apples)
An error occurred
@eddwan
eddwan / gist:deb8ddc0273d5a62ba6f415b318d3a9e
Created June 6, 2019 22:08 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@eddwan
eddwan / README.md
Created October 25, 2019 22:05 — forked from maxious/README.md
Esee/Anran 960P 180° Wireless Fisheye Panoramic CCTV Smart Camera HD WIFI Webcam IP
@eddwan
eddwan / README.md
Created October 25, 2019 22:05 — forked from maxious/README.md
Esee/Anran 960P 180° Wireless Fisheye Panoramic CCTV Smart Camera HD WIFI Webcam IP