Skip to content

Instantly share code, notes, and snippets.

@ktraff
ktraff / ceph-docker-multinode.sh
Created January 6, 2017 17:46
Patches kubelet agents with necessary ceph packages and a secretfile for mounting CephFS volumes in Kubernetes.
#!/bin/bash
# Script that patches kubernetes kubelet with
# various fixes to get CephFS mounts working.
KUBELET_ID=$(docker ps | grep kubelet | cut -d' ' -f1)
KUBELET_DESC=$(docker ps | grep kubelet | awk '{print $2}')
echo -e "KUBELET_ID=$KUBELET_ID ($KUBELET_DESC)"
document.getElementById('my_dialog_id').innerHTML = '<p>My dialog box</p>';
var template = _.template($('#my_template_id').html());
this.$el.html(template());
$('#id_of_my_dialog').html('<p>This is a dialog box</p>');
{% comment "This is an example of how to replace the logo. Removed the comment block and endblock to activate" %}
{% block logo %}
<td style="text-align: left; ">
<span>
<img src="{{ STATIC_URL }}map/projects/kyle_project/mybanner.png" />
</span>
</td>
{% endblock %}
{% endcomment %}
@ktraff
ktraff / mergeWf.json
Created October 22, 2015 21:04 — forked from anonymous/mergeWf.json
csip-gras merge water features
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ktraff
ktraff / minboundingrectangle.geojson
Last active August 29, 2015 14:23
minboundingrectangle.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"geometry":{
"type":"Polygon",
"coordinates":[
[
[
-104.97221946716309,
40.72202247464282
],
[
{
"type":"FeatureCollection",
"features":[
{
"type":"Feature",
"geometry":{
"type":"Polygon",
"coordinates":[
[
[
import csv
import re
f = open('out.csv','w')
def title_case(s, exceptions=['a', 'an', 'of', 'the', 'is']):
word_list = re.split(' ', s) #re.split behaves as expected
final = [word_list[0].capitalize()]
for word in word_list[1:]:
final.append(word in exceptions and word or word.capitalize())