Skip to content

Instantly share code, notes, and snippets.

View rgiaviti's full-sized avatar
Focusing

Ricardo Giaviti rgiaviti

Focusing
View GitHub Profile
@rgiaviti
rgiaviti / UnidadeFederacao.java
Last active April 4, 2025 21:14
Enum Java com todas as Unidades da Federação do Brasil
/**
* Enum com todas as Unidades da Federação do Brasil. Contém o nome da Unidade, a sigla e a capital
* da Unidade da Federação. As unidades estão listadas por ordem alfabética no enum.
*
* @author Ricardo Giaviti
* @version 1.1.1
* @since 1.0.0
*/
public enum UnidadeFederacao {
@rgiaviti
rgiaviti / JarSelfSigning.sh
Last active April 20, 2018 17:52
Self signing a JAR file
# Copyright 2017 Ricardo Giaviti
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
# to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions
# of the Software.
#
@rgiaviti
rgiaviti / SimpleRestClient.java
Created September 13, 2016 18:48
Simple REST Client using Jersey
/**
* The MIT License (MIT)
* Copyright (c) 2016 Ricardo Giaviti
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
@rgiaviti
rgiaviti / InstallingPostgreqSQLGem.sh
Last active September 30, 2016 18:31
Fixing error when installing PostgreSQL gem in Ubuntu 15.10
# The MIT License (MIT)
#
# Copyright (c) 2016 Ricardo Giaviti
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish, distribute,
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
@rgiaviti
rgiaviti / ldap_timestamp2date.rb
Last active September 30, 2016 18:31
This simple function converts LDAP Timestamp to Ruby DateTime object
# The MIT License (MIT)
#
# Copyright (c) 2016 Ricardo Giaviti
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software
# and associated documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish, distribute,
# sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#