Skip to content

Instantly share code, notes, and snippets.

View Rynaro's full-sized avatar
⚗️
Doing alchemy!

Henrique A. Lavezzo Rynaro

⚗️
Doing alchemy!
View GitHub Profile
@squarism
squarism / iterm2.md
Last active May 6, 2024 07:33
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@fmasanori
fmasanori / jogos.py
Last active October 30, 2022 00:00
World Cup in six lines of Python 3. Jogos da Copa do Mundo em cinco linhas de Python 3.
import requests
jogos = requests.get('http://worldcup.sfg.io/matches').json()
for jogo in jogos:
if jogo['status'] in ('completed', 'in progress'):
print (jogo['home_team']['country'], jogo['home_team']['goals'], 'x',
jogo['away_team']['country'], jogo['away_team']['goals'])
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active May 3, 2024 16:53
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%'