Skip to content

Instantly share code, notes, and snippets.

Avatar
💁‍♀️
I try to solve all my problems with a single SQL query.

Gabriela D'Ávila Ferrara gabidavila

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

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 Nov 3, 2013
GIT Colorido na linha de comando | Add Colors to GIT command Line
View git_colors.sh
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 Nov 3, 2013
Ignorar alteração de permissões de arquivos no GIT Ignore file permissions change on GIT
View git_file_permission.sh
git config core.fileMode false
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active Oct 21, 2021
Useful PostgreSQL Queries and Commands
View postgres_queries_and_commands.sql
-- 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%'