First create a Vagrantfile:
vagrant init precise64
Then add the following to the new Vagrantfile:
config.vm.provision :shell, :inline => <<-EOT
First create a Vagrantfile:
vagrant init precise64
Then add the following to the new Vagrantfile:
config.vm.provision :shell, :inline => <<-EOT
#!/usr/bin/python2.7 | |
# -*- coding: utf-8 -*- | |
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab | |
""" | |
Watch for new downloads in ~/Downloads (or another directory) and take actions. | |
The actions are determined by the file extension (determining the mime type). | |
""" | |
from __future__ import absolute_import | |
from __future__ import print_function |
// ==UserScript== | |
// @name dev.plone.org close bug as invalid | |
// @namespace plone | |
// @include https://dev.plone.org/ticket/* | |
// @version 1 | |
// @grant none | |
// @run-at document-end | |
// ==/UserScript== | |
$(document).ready(function () { |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Clone all gists of GitHub user with given username. | |
Clones all gist repos into the current directory, using the gist id as the | |
directory name. If the directory already exists as a git repo, try to perform a | |
'git pull' in it. | |
""" |
# first: mkdir user && cd user && cp /path/to/get_gists.py . | |
# python3 get_gists.py user | |
import requests | |
import sys | |
from subprocess import call | |
user = sys.argv[1] | |
r = requests.get('https://api.github.com/users/{0}/gists'.format(user)) |
<%- for (const item of it.items) { | |
const [ , kind, lib, key ] = item.uri.match(/^https?:\/\/zotero\.org\/(users|groups)\/((?:local\/)?[^/]+)\/items\/(.+)/) | |
const select = (kind === 'users') ? `zotero://select/library/items/${key}` : `zotero://select/groups/${lib}/items/${key}` | |
const relations = [] | |
if (item.relations) { | |
for (const [kind, rels] of Object.entries(item.relations)) { | |
for (const rel of rels) { | |
relations.push(rel) | |
} |