Skip to content

Instantly share code, notes, and snippets.

View vtbassmatt's full-sized avatar
:octocat:

Matt Cooper vtbassmatt

:octocat:
View GitHub Profile
@vtbassmatt
vtbassmatt / helvault2archidekt.py
Created August 8, 2019 09:56
Helvault -> Archidekt converter
"Convert Helvault CSV into Archidekt text format."
# keywords: helvault, mtg, magic the gathering, archidekt, csv, convert
import csv
with open('helvault.csv') as csvfile:
rdr = csv.DictReader(csvfile)
for row in rdr:
record = f"{row['quantity']}x {row['name']} ({row['set_code']})"
if 'foil' in row['extras']:
@vtbassmatt
vtbassmatt / securable.py
Last active February 28, 2023 12:38
Azure Repos Git security token - Python
"""
This implements security namespace tokens for Azure Repos (Git).
There is one top-level function, calculate_securable_from_branch().
>>> calculate_securable_from_branch('212d1460-2143-4296-9771-c54336dbf3d3', '393d8e86-ed2b-473f-8480-0cf728c1f866', 'master')
'repoV2/212d1460-2143-4296-9771-c54336dbf3d3/393d8e86-ed2b-473f-8480-0cf728c1f866/refs/heads/6d0061007300740065007200/'
"""
@vtbassmatt
vtbassmatt / GitUtilsSample.cs
Last active February 28, 2023 12:38
Azure Repos Git security token - C#
namespace Microsoft.VisualStudio.Services.Samples.Git
{
using System;
using System.Diagnostics;
using System.Linq;
using System.Text;
public class GitUtilsSample
{
public const string SecurableRoot = "repoV2/";
import urllib2
import re
import sys
from collections import defaultdict
from random import random
"""
PLEASE DO NOT RUN THIS QUOTED CODE FOR THE SAKE OF daemonology's SERVER, IT IS
NOT MY SERVER AND I FEEL BAD FOR ABUSING IT. JUST GET THE RESULTS OF THE
CRAWL HERE: http://pastebin.com/raw.php?i=nqpsnTtW AND SAVE THEM TO "archive.txt"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
BBEdit Language Module for TypeScript
Put this file in
~/Library/Application Support/BBEdit/Language Modules
or equivalent.
Based off the language file for CoffeeScript found at