Skip to content

Instantly share code, notes, and snippets.

View BrunoCaimar's full-sized avatar

Bruno Caimar BrunoCaimar

View GitHub Profile
@BrunoCaimar
BrunoCaimar / bash.sh
Created March 23, 2023 15:00
crypto-package-to-lambda
pip install \
--platform manylinux_2_17_x86_64 \
--implementation cp \
--python 3.9 \
--only-binary=:all: --upgrade \
--target site-packages \
cryptography
@BrunoCaimar
BrunoCaimar / fearless_campfire.md
Created October 7, 2021 17:44
Fearless change campfire

"If you're making new mistakes, then it shows you're learning." Perhaps a good attitude for our managers? - Karl Wiegers

I learned that I need to place the food at the desk next to mine - just 2 meters away so that I do not eat all of it myself Klaus Marquardt

I heard from one company in the UK -- Maria's Rule -- there is no problem that cake cannot solve :-)! Linda Rising to Everyone (11:26 AM)

@BrunoCaimar
BrunoCaimar / GERA_DELETES_ORACLE.SQL
Created December 18, 2020 20:52
GERA_DELETES_ORACLE (baseado no catalogo)
SELECT
'DELETE FROM '
|| table_name
|| ';'
FROM
all_tables t
JOIN
all_objects o
ON
@BrunoCaimar
BrunoCaimar / query_dominio_valores.sql
Created July 31, 2020 19:02
ArcGIS - Query para obter valores de um dominio
SELECT
*
FROM
(
SELECT
extractvalue(codedvalues.column_value,'CodedValue/Code') AS code,
extractvalue(codedvalues.column_value,'CodedValue/Name') AS value
FROM
sde.gdb_items_vw items
INNER JOIN
@BrunoCaimar
BrunoCaimar / dominios.sql
Created July 31, 2020 18:58
ArcGIS - Dominios tabelas/features
SELECT
i.name AS item_name,
extractvalue(definition_xml.column_value,'GPFieldInfoEx/Name') AS field_name,
extractvalue(definition_xml.column_value,'GPFieldInfoEx/DomainName') AS domain_name,
it.name AS item_type
FROM
sde.gdb_items_vw i
JOIN
sde.gdb_itemtypes it
ON
@BrunoCaimar
BrunoCaimar / Checksum.cs
Created June 25, 2020 18:19
MD5 e SHA256 CheckSum generation
public static string GetMD5Checksum(string input)
{
using (MD5 md5 = MD5.Create())
{
byte[] inputBytes = Encoding.ASCII.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);
return BitConverter.ToString(hashBytes).Replace("-", String.Empty);
}
}
@BrunoCaimar
BrunoCaimar / oracle_recipes.md
Last active January 6, 2020 17:20
Oracle PL/SQL Recipes

Oracle recipes

Columns

  • ALL_TAB_COLUMNS / DBA_TAB_COLUMNS / USER_TAB_COLUMNS
select C.*, T.* from DBA_TAB_COLUMNS C JOIN DBA_TABLES T ON T.TABLE_NAME = C.TABLE_NAME
where column_name like '%UTD%'
order by C.table_name, column_name;
@BrunoCaimar
BrunoCaimar / limpa_conexoes_nao_ativas.sql
Created December 9, 2019 14:10
SDE limpa_conexoes_nao_ativas.sql
select USERNAME, MACHINE, OSUSER, PROGRAM from v$session where audsid
in (select audsid from SDE.PROCESS_INFORMATION);
-- Identifica os usuários que estão na process information e não possuem conexão ativa no oracle
select * from sde.process_information
where audsid not in (select audsid from v$session);
-- Limpa as conexões orfãs
delete from sde.process_information
where audsid not in (select audsid from v$session);
@BrunoCaimar
BrunoCaimar / teste.geojson
Created October 3, 2019 21:22
Poligono GeoJson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.