Skip to content

Instantly share code, notes, and snippets.

View hoadinhmai's full-sized avatar
🎯
Focusing

Hoa Mai hoadinhmai

🎯
Focusing
  • Melbourne, Australia
View GitHub Profile
@Kartones
Kartones / postgres-cheatsheet.md
Last active September 1, 2026 09:40
PostgreSQL command line cheatsheet

PSQL Cheatsheet

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@jonico
jonico / Jenkinsfile
Last active July 13, 2026 14:37
Example for a full blown Jenkins pipeline script with CodeQL analysis steps, multiple stages, Kubernetes templates, shared volumes, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, Docker containers, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, …
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
def label = "mypod-${UUID.randomUUID().toString()}"
podTemplate(label: label, yaml: """
spec:
containers:
- name: mvn
image: maven:3.3.9-jdk-8