Skip to content

Instantly share code, notes, and snippets.

View davidrothera's full-sized avatar

David Rothera davidrothera

  • Dublin, Ireland
View GitHub Profile
@davidrothera
davidrothera / Service Instance example
Created November 29, 2012 10:19
Service Instance example
int GigabitEthernet9/1
service instance 2169 ethernet
description MGMNT
encapsulation dot1q 3503 second-dot1q 2
rewrite ingress tag pop 2 symmetric
bridge-domain 2169
!
service instance 2170 ethernet
description VPN
encapsulation dot1q 3503 second-dot1q 300
#!/bin/bash
redcarpet $1 > /tmp/body
cat header > /tmp/full
cat /tmp/body >> /tmp/full
cat /tmp/full > $2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>BST : DST on Cisco Routers</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
/*
This document has been created with Marked.app <http://markedapp.com>, Copyright 2011 Brett Terpstra
Description: If the array is empty, we return an empty string.
Origin: vendor
Bug-Debian: http://bugs.debian.org/593043
Author: Raphaël Hertzog <hertzog@debian.org>
Reviewed-by: gregor herrmann <gregoa@debian.org>
Last-Update: 2012-06-05
--- a/Simple.pm
+++ b/Simple.pm
@@ -471,6 +471,7 @@
### Keybase proof
I hereby claim:
* I am davidrothera on github.
* I am davidrothera (https://keybase.io/davidrothera) on keybase.
* I have a public key whose fingerprint is C121 82F8 182C 694E 5F77 DC2F 39D1 E90A C6E9 77C1
To claim this, I am signing this object:
tell application "Microsoft Outlook"
activate
set msgSet to current messages
if msgSet = {} then
error "No messages selected. Select at least one message."
error -128
end if
set theMsg to item 1 of msgSet
set theAccount to account of theMsg
set archiveFolder to folder "Archive" of folder "Inbox" of theAccount
### Keybase proof
I hereby claim:
* I am davidrothera on github.
* I am davidrothera (https://keybase.io/davidrothera) on keybase.
* I have a public key whose fingerprint is 74A7 A9E8 0779 983E A926 6EF9 2464 8245 0A1A 74FF
To claim this, I am signing this object:
#
# Automounter master map
#
+auto_master # Use directory service
/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/- -static
/- auto_nfs -nobrowse,nosuid
@davidrothera
davidrothera / pocket.sh
Created November 20, 2015 15:43
Send Safari bookmarks to Pocket
#!/bin/bash
# Script to export Safari's reading list into a text file and email the individual links
# First take all of Safari's Reading List items and place them in a text file.
/usr/bin/plutil -convert xml1 -o - ~/Library/Safari/Bookmarks.plist | grep -E -o '<string>http[s]{0,1}://.*</string>' | grep -v icloud | sed -E 's/<\/{0,1}string>//g' > readinglistlinksfromsafari.txt
# Now loop over each of those URls within that text file and add them to pocket.
while IFS= read -r line
do
/usr/sbin/sendmail -i -f david.rothera@gmail.com add@getpocket.com <<END
@davidrothera
davidrothera / fix-infinality.md
Created February 9, 2017 19:05 — forked from cryzed/fix-infinality.md
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08: