Skip to content

Instantly share code, notes, and snippets.

View tomestephens's full-sized avatar
🍨

Tom Stephens tomestephens

🍨
  • Mersive Technologies
  • Colorado
View GitHub Profile
@tomestephens
tomestephens / sprint-letter.html
Created August 1, 2019 17:50
We use Letters for our sprint relative to the position in the year - so I made a super simple UI to give you the right letter for a given date.
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<script>
const alphabet = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
function getSprintLetter() {
const dateStr = document.getElementById("release_date").value
const messageBox = document.getElementById("messageBox")
@tomestephens
tomestephens / MyPlayground.swift
Last active July 31, 2019 15:48
Learning Swift -- some string manipulation in a playground
import UIKit
extension StringProtocol {
func ranges(of: String) -> [Range<Index>] {
var ranges: [Range<Index>] = []
var range = self.range(of: of)
while let r = range {
ranges.append(r)
range = self[r.upperBound...].range(of: of)
@tomestephens
tomestephens / script.cs
Created May 26, 2019 17:26
Space Engineers:: Simple Target/Par Stock Inventory Manager
public Program()
{
Runtime.UpdateFrequency = UpdateFrequency.Update100;
}
private static void DisplayText(string text, IMyTextPanel panel) {
panel.WriteText(text);
panel.ShowPublicTextOnScreen();
}
@tomestephens
tomestephens / bucket_manager.py
Last active November 12, 2018 22:01
Simple Python class for working with GCP Buckets
import os
import tempfile
from google.cloud import storage
from google.cloud.storage import Blob
class BucketManager(object):
def __init__(self, bucket_name):
self._storage_client = storage.Client()
self._bucket = self._storage_client.get_bucket(bucket_name)

Keybase proof

I hereby claim:

  • I am tomestephens on github.
  • I am tomestephens (https://keybase.io/tomestephens) on keybase.
  • I have a public key whose fingerprint is 5BB5 7883 4075 3157 891B 1B5F C14D 7716 4AFA 0FB5

To claim this, I am signing this object:

@tomestephens
tomestephens / DataGridDetailsExample.xaml
Last active April 5, 2024 13:12
A very simple example for using WPF to hide/show the row details on a DataGrid.
<UserControl x:Class="DataGridExample.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:converters="clr-namespace:DataGridExamples.Converters"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<UserControl.Resources>
<ResourceDictionary>