Skip to content

Instantly share code, notes, and snippets.

View voelzmo's full-sized avatar
:octocat:
Just here for the comments.

Marco Voelz voelzmo

:octocat:
Just here for the comments.
  • Heidelberg, Germany
View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@Kartones
Kartones / postgres-cheatsheet.md
Last active November 15, 2024 21:14
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)
@drnic
drnic / nats.sh
Created June 17, 2015 14:46
Target current BOSH's current CF manifest and run nats CLI on its nats configuration
#!/bin/bash
# Assumes using nats CLI from https://github.com/soutenniza/nats/releases
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR/..
bosh_target=$(cat .bosh_config | yaml2json | jq -r ".target")
manifest=$(cat .bosh_config | yaml2json | jq -r ".deployment[\"$bosh_target\"]")
mbus=$(cat $manifest | yaml2json | jq -r '.properties.nats | "nats://\(.user):\(.password)@\(.address):\(.port)"')
@codeword
codeword / generate_fly_exec.rb
Last active August 7, 2018 17:59
script to generate fly execute shell scripts with values from the pipeline/task/secrets files
#!/usr/bin/env ruby
require 'yaml'
require 'optparse'
options = {
target: 'local'
}
optparse = OptionParser.new do |opt|
@karlkfi
karlkfi / resize.sh
Created August 23, 2016 02:57
Resizing a vagrant centos disk... the hard way
#!/usr/bin/env bash
# Resizing a vagrant centos disk... the hard way
set -o errexit
set -o nounset
set -o pipefail
set -o xtrace
vagrant up