Skip to content

Instantly share code, notes, and snippets.

View gabidavila's full-sized avatar
💁‍♀️
I try to solve all my problems with a single SQL query.

Gabriela Ferrara gabidavila

💁‍♀️
I try to solve all my problems with a single SQL query.
View GitHub Profile
@gabidavila
gabidavila / _introduction.md
Last active April 11, 2019 17:32
Determines if a positive integer is a palindrome mathematically

Using Math to find palindromes

For an instance, forget that arrays and strings exists. Your challenge, is to say if a number is a palindrome or not using mostly mathematical approach.

The string you will receive (because it is an user input), it always positive. You can assume that every 0 <= n < 10 is a palindrome.

@gabidavila
gabidavila / git_colors.sh
Created November 3, 2013 21:35
GIT Colorido na linha de comando | Add Colors to GIT command Line
git config --global color.ui auto
git config --global color.branch auto
git config --global color.diff auto
git config --global color.interactive auto
git config --global color.status auto
@gabidavila
gabidavila / git_file_permission.sh
Created November 3, 2013 21:13
Ignorar alteração de permissões de arquivos no GIT Ignore file permissions change on GIT
git config core.fileMode false
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 23, 2024 19:14
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'