Skip to content

Instantly share code, notes, and snippets.

View rhysjtevans's full-sized avatar
💭
Busy coding

Rhys Evans rhysjtevans

💭
Busy coding
View GitHub Profile
@rhysjtevans
rhysjtevans / PutAzureBlob.sh
Last active September 3, 2020 15:31
Azure Based Gists
# This is built on the getAccessToken.sh script.
# More info can be found https://docs.microsoft.com/en-us/rest/api/storageservices/blob-service-rest-api
FILEUPLOAD="my_file.txt"
MD5=$(md5sum ${FILEUPLOAD} | awk '{print $1}' | tr -d "\n" | xxd -r -ps | base64 )
curl -X PUT --upload-file $FILEUPLOAD \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "x-ms-blob-type: BlockBlob" \
-H "x-ms-version: 2017-11-09" \
-H "Content-MD5: ${MD5}" \ # Microsoft will use this to validate the file integrity when it finishes transferring the contents.
@rhysjtevans
rhysjtevans / terraform-gitlab.tf
Created May 22, 2020 10:46
A quick terraform module to provision standardised
resource "gitlab_project" "repository" {
name = var.gitlab_project_name
path = replace(lower(var.gitlab_project_name)," ","-")
description = var.gitlab_project_description
namespace_id = var.gitlab_group_id
default_branch = var.gitlab_project_default_branch
approvals_before_merge = var.gitlab_project_approvals_before_merge
merge_method = var.gitlab_project_merge_method
visibility_level = var.visibility_level
initialize_with_readme = var.initialize_with_readme
Install-Module -Name PSSlack -Force
Import-Module -Name PSSlack
$Workspaces = @{
LIVE = @(
@{
Uri = 'https://hooks.slack.com/services/XXXXX'
Workspace = 'YYYYY' # DSAB
Channel = 'ZZZZZ'