Skip to content

Instantly share code, notes, and snippets.

View marji's full-sized avatar

Marji Cermak marji

View GitHub Profile
@marji
marji / jeff.sh
Created October 31, 2013 13:33
Bash has regular expression built in. Temporary file, please ignore.
#!/bin/bash -x
string="matchthis, but not this"
pattern="([a-z]+)"
[[ $string =~ $pattern ]]
result=${BASH_REMATCH[1]}
@marji
marji / filesizes
Last active January 4, 2016 10:59
filesizes - prints CSV line for each filepath given - path, size, width, height
#!/bin/bash
#
# filesizes, v. 20140125
# Author: marji@morpht.com, http://morpht.com
#
# Script which reads filenames from the standard output
# and prints a CSV in form of filepath, size in bytes, image width, image height
# Required package: imagemagick (the identify binary)
# http://www.imagemagick.org/script/identify.php
#

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
input {
stdin {
type => "stdin-type"
}
syslog {
type => syslog
port => 5514
}
file {
type => "logstash"
@marji
marji / drop_and_play.bash
Created April 26, 2015 15:09
Script to update running libre presentation from Dropbox. Written for a Raspberry PI.
#!/bin/bash
# Drop And Play
# A script for updating a document from a dropbox URL.
# It checks the etag, if it has changed, it downloads and deploy the new document.
# Call this from Cron.
#
# Originally written for Raspberry PI running a Libre Office impress slideshow
# in an infinite loop (called play.odp)
@marji
marji / logstash_indexer.conf
Created September 27, 2016 11:39
drupal watchdog logstash config
# logstash indexer filter for drupal watchdog
#
# See: https://events.drupal.org/dublin2016/sessions/building-high-available-elk-drupal
#
filter {
grok {
match => { "message" => "%{SYSLOGWATCHDOG}" }
}
date {

Keybase proof

I hereby claim:

  • I am marji on github.
  • I am cermakm (https://keybase.io/cermakm) on keybase.
  • I have a public key ASDyxcQpcFoSUtPeRkHVIciRazX_LkXxA55-XB4gaDXwjAo

To claim this, I am signing this object: