Skip to content

Instantly share code, notes, and snippets.

View gfnord's full-sized avatar
🏠
Working from home

Gustavo F Nobrega gfnord

🏠
Working from home
View GitHub Profile
@chusiang
chusiang / teams-chat-post-for-workflows.sh
Last active April 28, 2025 01:31
Post a message to Microsoft Teams with bash script.
#!/bin/bash
# =============================================================================
# Author: Chu-Siang Lai / chusiang (at) drx.tw
# Filename: teams-chat-post-for-workflows.sh
# Modified: 2024-07-22 11:44 (UTC+08:00)
# Description: Post a message to Microsoft Teams via "Post to a chat when a webhook request is received" workflows.
# Reference:
#
# - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025
# - https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams/
@ricardofalasca
ricardofalasca / .vimrc
Last active October 29, 2019 16:58
My .vimrc
" run pathogen
execute pathogen#infect()
" show line numbers
set nu
" set auto indent
set ai
" enable syntax
syntax on
" open a new tab (control + t)
nmap <C-t> :tabnew<CR>
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active April 29, 2025 13:20
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%'