Skip to content

Instantly share code, notes, and snippets.

View AubreyHewes's full-sized avatar
💭
I may be slow to respond.

Aubrey AubreyHewes

💭
I may be slow to respond.
View GitHub Profile
@AubreyHewes
AubreyHewes / notify_slack_munin.sh
Last active March 28, 2019 15:37 — forked from hugochinchilla/slack_munin.sh
Slack notification script for Munin
#!/usr/local/bin/bash
# Slack notification script for Munin
# Mark Matienzo (@anarchivist)
#
# To use:
# 1) Create a new incoming webhook for Slack
# 2) Edit the configuration variables that start with "SLACK_" below
# 3) Add the following to your munin configuration:
#
@AubreyHewes
AubreyHewes / A.markdown
Created April 26, 2018 23:48 — forked from larrybotha/A.markdown
Fix SVGs not scaling in IE9, IE10, and IE11

Fix SVG in <img> tags not scaling in IE9, IE10, IE11

IE9, IE10, and IE11 don't properly scale SVG files added with img tags when viewBox, width and height attributes are specified. View this codepen on the different browsers.

Image heights will not scale when the images are inside containers narrower than image widths. This can be resolved in 2 ways.

Use sed in bash to remove width and height attributes in SVG files

As per this answer on Stackoverflow, the issue can be resolved by removing just the width and height attributes.

@AubreyHewes
AubreyHewes / redux-form-react-quill.jsx
Created November 10, 2017 16:40 — forked from Gaya/redux-form-react-quill.jsx
How to use React Quill inside Redux Forms
import React from 'react';
import { Field } from 'redux-form';
import ReactQuill from 'react-quill';
function renderQuill({ input }) {
return (
<ReactQuill
{...input}
onChange={(newValue, delta, source) => {
if (source === 'user') {
@AubreyHewes
AubreyHewes / rules-both.iptables
Created October 26, 2017 15:48 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <jakub@jirutka.cz>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@AubreyHewes
AubreyHewes / README
Created October 31, 2012 09:22 — forked from vrillusions/README
Use bitbucket as a private offsite code backup (edited)
Now that bitbucket supports git, it's easy to use their service as a free, private, offsite code backup. Just create an empty repo for your project on bitbucket, add it as a remote to your development repo:
username@host:~/project$ git remote add bitbucket https://username@bitbucket.org/username/project.git
### initial push of something in order for the mirror to succeed
username@host:~/project$ git push bitbucket master
The mirror command only works after the remote has been initially filled.
Use this post-commit hook to silently and automatically push your changes up after each commit.