Skip to content

Instantly share code, notes, and snippets.

View mchmarny's full-sized avatar

Mark Chmarny mchmarny

View GitHub Profile
@mchmarny
mchmarny / auto-increment-version.sh
Created January 18, 2022 23:47 — forked from CSTDev/auto-increment-version.sh
Script that will find the last Git Tag and increment it. It will only increment when the latest commit does not already have a tag. By default it increments the patch number, you can tell it to change the major or minor versions by adding #major or #minor to the commit message.
#!/bin/bash
#get highest tag number
VERSION=`git describe --abbrev=0 --tags`
#replace . with space so can split into an array
VERSION_BITS=(${VERSION//./ })
#get number parts and increase last one by 1
VNUM1=${VERSION_BITS[0]}

Keybase proof

I hereby claim:

  • I am mchmarny on github.
  • I am mchmarny (https://keybase.io/mchmarny) on keybase.
  • I have a public key ASAa7R36JF5b6fYwgMXCofLez4nyGxT7YElAp3EggnXyjQo

To claim this, I am signing this object:

@mchmarny
mchmarny / gist:2222e8aaa12c281165e9b1c3be7367cb
Created December 1, 2017 21:34
How to create Cloud Spanner database from long DDL
#!/bin/bash
# Cloud Spanner does supports DDL operations but to load a real (long) DDL
# you will wanna use something similar to this script to parse each command
# Define path to your DDL
# export SPANNER_DB_DDL="./tpch-v2-17-3.ddl"
echo 'Loading DDL...'
echo 'NOTE: empty @type property warning on return protobuf message are OK'
HTTP/1.1 200 OK
Vary: Origin
Vary: X-Origin
Content-Type: multipart/mixed; boundary=batch_ap8raPzn7Co_AAXg-8GNRFg
Content-Encoding: gzip
Date: Thu, 29 Jun 2017 02:37:51 GMT
Expires: Thu, 29 Jun 2017 02:37:51 GMT
Cache-Control: private, max-age=0
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN