Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am matstace on github.
  • I am matstace (https://keybase.io/matstace) on keybase.
  • I have a public key whose fingerprint is AC88 6298 9ED1 666B 9207 795A A22D 6F47 175E 98C2

To claim this, I am signing this object:

@MatStace
MatStace / backup.sh
Created November 28, 2013 15:16 — forked from nherment/backup.sh
#!/bin/bash
# herein we backup our indexes! this script should run at like 6pm or something, after logstash
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas,
# compress the data files, create a restore script, and push it all up to S3.
TODAY=`date +"%Y.%m.%d"`
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES
INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/"
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put"
BACKUPDIR="/mnt/es-backups/"
YEARMONTH=`date +"%Y-%m"`
Current configuration : 3791 bytes
!
version 12.4
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname orion
!
@MatStace
MatStace / damn-job-pimp.txt
Created April 6, 2011 15:46
Epic Job Pimp BS
Good Day to you Mathew,
I am currently recruiting for a role within what is, without doubt the greatest digital agency in the world. I am not joking, the company are at the forefront of digital agencies, indeed, when their name is mentioned in certain circles, eyes widen, pulses race!
I don't think that I have ever had the good fortune previously to work for such a wonderful company. The staff retention figures are excellent, which bears testament to the fact that this agency is quite literally the greatest!
Hyperbole aside, the company specialises in joined-up communications for the financial services sector. They provide innovative and award-winning solutions through an open and honest culture, forging strong relationships with both their clients and employees alike. As an expanding business, they want people who are passionate about financial communications, technologies and who will contribute to the successful growth of the company going forward.
#!/usr/bin/env ruby
# Ruby script to automatically "git rm" deleted files
DELETED_REXP = /^#\s+deleted:\s+(.*)/
MARKER_LINE = '# Changed but not updated:'
lines = `git status`
found_marker = false