Skip to content

Instantly share code, notes, and snippets.

View capncodewash's full-sized avatar

Graeme West capncodewash

  • Glasgow
View GitHub Profile
RewriteEngine On
RewriteMap fedora-map prg:/wgbh/http/openvault/map.fedora.py
RewriteCond %{REQUEST_URI} Proxy #map just URIs with Proxy in them..
RewriteRule ^/fedora/get/([a-zA-Z0-9/:\-\.]+)$ ${fedora-map:$1} [QSA] # send along the query string.. hopefully the regex is about right.. ought to check it someday.
@smgoller
smgoller / gist:1171102
Created August 25, 2011 16:36 — forked from mhinze/gist:123732
git svn workflow
# adapted from http://notes.jimlindley.com/2008/3/25/git-svn-that-works-for-me
# initial setup
git svn clone <svn_repo>
# begin the workflow
git svn fetch -r HEAD --ignore-paths="Package.zip" # aliased to 'git up', my Package.zip is very large.
git svn rebase -l # we just updated, no need to go back to the svn repo
# 99% of daily workflow
@juanje
juanje / gist:2558286
Created April 30, 2012 13:17
Simple Vagrantfile for testign Django with Chef-solo
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "base"
# Assing IP to the VM
config.vm.network :hostonly, "10.0.33.10"
# Share directory between the host and the VM
config.vm.share_folder "git","/opt/git","/home/anarey/git/djandoapps"
@dex4er
dex4er / xsd-merge.xslt
Created November 21, 2011 23:04
XSLT tools for XSD and WSDL schemas
<?xml version="1.0"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsl:output version="1.0" encoding="utf-8" indent="yes" name="xml" />
<xsl:template match="/">
<xsl:apply-templates />
@christiangalsterer
christiangalsterer / README.md
Last active December 16, 2019 20:28
Atlassian Jira: Number of issues in a Jira Query Language (JQL) search

Description

A Dashing widget to display the number of issues returned by a Jira Query Language (JQL) search. The number of issues will be displayed using the Numbers widget. This widget is a generalized version of the Atlassian Jira: Number of issues in a Jira filter query widget, which shows the number of issues for saved Jira filter.

Dependencies

The following dependencies are required. Please add them to your dashing gemfile.

gem 'jira-ruby', :require => 'jira'
@jaredwinick
jaredwinick / README.md
Last active April 21, 2020 10:44
Apache Zeppelin Object Exchange for passing a DataFrame of feature vectors from the Scala Spark interpreter to PySpark to get a numpy array

Apache Zeppelin has a helpful feature in its Spark Interpreter called Object Exchange. This allows you to pass objects, including DataFrames, between Scala and Python paragraphs of the same notebook. You can do your data prep/feature engineering with the Scala Spark Interpreter, and then pass off a DataFrame containing the features to PySpark for use with libraries like NumPy and scikit-learn. Also with Zeppelin's support for matplotlib you have a pretty good setup for poking around and testing out machine learning on your data.

@gregology
gregology / dashboard
Last active December 8, 2020 14:19
Service script for dashing. Update DASHING_DIR variable, add this file to /etc/init.d/ , chmod to 755, and let update rc.d with $ sudo update-rc.d dashboard defaults This scripts stops the dashing service with "killall thin" which will kill all thin services running on your server.
#!/bin/bash
# Dashing service
# Add this file to /etc/init.d/
# $ sudo cp dashboard /etc/init.d/
# Update variables DASHING_DIR, GEM_HOME, & PATH to suit your installation
# $ sudo nano /etc/init.d/dashboard
# Make executable
# $ sudo chmod 755 /etc/init.d/dashboard
# Update rc.d
# $ sudo update-rc.d dashboard defaults
@joepadmiraal
joepadmiraal / LICENSE.md
Last active December 21, 2020 16:41
Jenkins build status widget for Dashing

The MIT License (MIT)

Copyright (c) 2014 David Underwood

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 furnished to do so, subject to the following conditions:

@jakeybob
jakeybob / generate_scot_std_pop_daily.R
Created June 7, 2021 20:22
Scotland standardised age/sex interpolated populations
library(tidyverse)
library(janitor)
library(lubridate)
library(zoo)
library(ckanr)
# generates age/sex population lookup for Scotland based on NRS mid-year
# population estimates/projections, interpolated linearly to day level
# (July 2nd used as mid-year reference date).
#
@myobie
myobie / mountain-lion-brew-setup.markdown
Created February 18, 2012 20:14
Get Mountain Lion and Homebrew to Be Happy

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.