Skip to content

Instantly share code, notes, and snippets.

View dschien's full-sized avatar

Daniel Schien dschien

  • University of Bristol
  • Bristol
View GitHub Profile
@iMilnb
iMilnb / boto3_hands_on.md
Last active October 19, 2022 09:15
Programmatically manipulate AWS resources with boto3 - a quick hands on

boto3 quick hands-on

This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].

First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as

  • [awscli][1] is boto-based
  • [awscli][1] usage is really close to boto's
@erineland
erineland / exportsafarireadinglist.sh
Last active January 19, 2020 00:58
Export Safari's Reading List to Pocket/Evernote (or any service with an "email content in" feature)
#!/bin/bash
# Script to export Safari's reading list into a text file, then import this into Pocket or Evernote (or any service with a "email in content" feature).
# 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
echo $line
#!/usr/bin/osascript
# Usage: omnifocus-inbox Do something @Work
on run argv
set AppleScript's text item delimiters to " "
set theText to argv as string
tell application "OmniFocus"
parse tasks into default document with transport text theText
end tell
end run
@domdavis
domdavis / opml2md
Last active August 5, 2023 03:08
OPML to Markdown converter, based on https://gist.github.com/alecperkins/5671192 and fixed up to produce a nested list in Markdown.
"""
Based on https://gist.github.com/alecperkins/5671192
$ pip install opml
$ python opml2md.py some_outline.opml
-> some_outline.md
"""
import codecs
import opml
import sys
@schmurfy
schmurfy / gist:3199254
Created July 29, 2012 14:33
Install pandoc Mac OS X 10.8
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
$ sudo chown -R `whoami` /usr/local/texlive
$ tlmgr update --self
$ tlmgr install ucs
$ tlmgr install etoolbox
# Install pandoc view homebrew
@tetsuok
tetsuok / whitecolor.gp
Created May 8, 2012 22:26
Code to change colors of various components in Gnuplot
# Change colors of elements in Gnuplot
# change a color of border.
set border lw 3 lc rgb "white"
# change text colors of tics
set xtics textcolor rgb "white"
set ytics textcolor rgb "white"
# change text colors of labels