Skip to content

Instantly share code, notes, and snippets.

@gdimitris
gdimitris / iterm2.md
Created June 5, 2020 17:30 — forked from squarism/iterm2.md
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)
@gdimitris
gdimitris / postgres-cheatsheet.md
Created December 19, 2019 09:35 — forked from th3hunt/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

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)
@gdimitris
gdimitris / ProGit.md
Last active November 26, 2019 11:28 — forked from th3hunt/ProGit.md
Pro Git - A list of Git aliases & recipes to Git like a 😎

Pro Git

A list of Git aliases & recipes to Git like a 😎.

Aliases

  # List all aliases :)
  la = "!git config -l | grep alias | cut -c 7-"

  # Clean oneline log
  l = log --graph --pretty=format':%C(yellow)%h%C(auto)%d%Creset %Creset%s %C(242)<%an>%Creset'
@gdimitris
gdimitris / .gitconfig
Created May 25, 2019 14:23 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
dmerged = "git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d"
st = status
@gdimitris
gdimitris / pipeline.gdsl
Created November 8, 2018 13:33 — forked from ggarcia24/pipeline.gdsl
GDSL supporting pipeline declarative
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
@gdimitris
gdimitris / pipeline.gdsl
Created November 8, 2018 13:32 — forked from fredericrous/pipeline.gdsl
GDSL supporting pipeline declarative
//The global script scope
def ctx = context(scope: scriptScope())
//What things can be on the script scope
contributor(ctx) {
method(name: 'pipeline', type: 'Object', params: [body: Closure])
property(name: 'params', type: 'org.jenkinsci.plugins.workflow.cps.ParamsVariable')
property(name: 'env', type: 'org.jenkinsci.plugins.workflow.cps.EnvActionImpl.Binder')
property(name: 'currentBuild', type: 'org.jenkinsci.plugins.workflow.cps.RunWrapperBinder')
property(name: 'scm', type: 'org.jenkinsci.plugins.workflow.multibranch.SCMVar')
@gdimitris
gdimitris / Dockerfile
Created August 16, 2018 09:48 — forked from wf9a5m75/Dockerfile
Dockerfile for https://github.com/gojuno/mainframer remote android build system.
FROM ubuntu:16.04
MAINTAINER Balachandar KM "[email protected]"
# Install java8
RUN apt-get update && \
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:webupd8team/java && \
(echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections) && \
apt-get update && \