Skip to content

Instantly share code, notes, and snippets.

View manarth's full-sized avatar

Marcus Deglos manarth

  • London and South-East, UK
View GitHub Profile
Install-Module -Name PSSlack -Force
Import-Module -Name PSSlack
$Workspaces = @{
LIVE = @(
@{
Uri = 'https://hooks.slack.com/services/XXXXX'
Workspace = 'YYYYY' # DSAB
Channel = 'ZZZZZ'
@manarth
manarth / docker-connect
Created May 29, 2019 07:39
docker-connect: Shortcut for connecting to a container managed by docker-compose
#!/bin/bash
# Short-cut to connect to a running docker-compose managed container.
# Instead of invoking `docker ps` to list containers, then calling
# `docker exec -it <container id> /bin/bash, simply invoke
# `docker-connect <name of service>`
if [ $# -ne 1 ]
then
printf "%s\n" "Usage: docker-connect <name of service>"
fi
@manarth
manarth / gist:2a93501675b94c4be289
Created June 16, 2015 14:51
Characteristics of a modern deployment tool
A modern deployment system has the following characteristics:
- separates code/deployment instructions from environment configuration
- isolates environment configuration into a single reusable component (such as a properties file)
- executes a complete deployment process with a single command
- logs errors (and optionally logs each step, even if that step is successful)
- reports errors to the operator, and aborts the deployment process
- operates atomically, so incomplete deployment processes are neither deployed, nor interfere with other deployments
@manarth
manarth / gist:5501271
Created May 2, 2013 09:57
Dumb DB backup script.
#!/bin/bash
# Store backup in this directory:
dir="/home/xxx/database_backups/"
# Backups will be stored in the pattern $filename-date-time.sql.gz
filename="dbbackup.myblog.com"
# Database to backup
db=blog
@manarth
manarth / gist:5489742
Created April 30, 2013 16:12
Example SMB config for vagrant.
[srv]
comment = Development
path = /srv
browseable = yes
read only = no
guest ok = yes
force user = vagrant
force group = vagrant
@manarth
manarth / g.d.o.email-initial.txt
Created March 9, 2013 08:28
Notification emails from groups.drupal.org - an initial email, and a first-revision.
Updates for Discussion: Is it possible to pre-populate an empty field (of any type) with data?
- New Comment on Is it possible to pre-populate an empty field (of any type) with data? by PQ titled You probably need to add the
Read more http://groups.drupal.org/node/286708#comment-897883
- New Comment on Is it possible to pre-populate an empty field (of any type) with data? by spessex titled Hi Paul
Unfortunately 'Save
Read more http://groups.drupal.org/node/286708#comment-897928
- New Comment on Is it possible to pre-populate an empty field (of any type) with data? by PQ titled Could you export the rule and
Read more http://groups.drupal.org/node/286708#comment-897993
- New Comment on Is it possible to pre-populate an empty field (of any type) with data? by aburrows titled If you want to autosave, then
Read more http://groups.drupal.org/node/286708#comment-897998
@manarth
manarth / drupal killer contract.md
Created January 8, 2013 19:42
Drupal contract, based on Andy Clarke's Killer Contract: https://gist.github.com/4031343

Technical Consultancy Contract

Between us [company name] and you [customer name]

Summary

@manarth
manarth / Contract Killer 3.md
Created November 7, 2012 12:29 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.