Skip to content

Instantly share code, notes, and snippets.

View langford's full-sized avatar

Michael Langford langford

View GitHub Profile
@langford
langford / adder.swift
Last active December 13, 2017 22:48
Georgina's Sequence
//Playground
typealias StringBinary = String
///Converts a UInt to a binary string representation
func binary(_ v:UInt,_ rest:StringBinary="")->StringBinary {
switch v {
case v where v == 0:
return "0" + rest
case v where v == 1:
@langford
langford / comprehensions.py
Last active February 7, 2018 14:32
Explanations of different comprehensions in python3
"""This is an explainer for what list comprehensions are
Python was more adopted by mathy types than functional programmer types of people.
One thing that mathy types and functional programmer types have in common is
they often think similarly about data.
They both use statements about varables, called 'Declarative programming' over
statements that are a series of instructions to the compiler to move a value
here or there or whatever (called 'Imperative programming')
@langford
langford / pricing.md
Created June 29, 2018 13:45
Metal Pricing Guide

What does a metal port mean to them? How many files? How many abstractions? How wrapped up in special case performance logic are they?

As there are not enough people who can do this, there should be a high rate. There is also a lot of minutia on top of the literal coding.

There is a ton of power you need to get this done. This needs to be granted to you as a matter of the contract. Continually reconvincing them to do the correct thing as you go will be tremendously draining.

You should have contractual technical assistance on their side with adapting their build system. (“In addition to a Decisionmaker, Client will provide a build assistance engineer to help with the asset pipeline and other project specfic tooling as needed, within 48 hours of notice of a problem. Build assistance engineer will supply written documentation on portion under discussion after the meeting for future documentation.”)

If you do not have a current and past stable of test devices, a portion (33-40%) should be billed as a fixed

@langford
langford / chunks.swift
Last active August 16, 2018 18:43
Chunking data
//: Playground - noun: a place where people can play
import UIKit
struct ChunkedData{
let chunkCount:Int
let chunkSize:Int
let byteCount:Int
let originalData:Data
let chunks:[Data]
@langford
langford / progressQuestionMark.py
Created December 3, 2022 20:28
Emotional Feeling of a Progress Bar
import time
import sys
import os
def clearline():
sys.stdout.write("\033[2K\033[1G")
def clearscreen():
@langford
langford / index.html
Created December 4, 2024 17:53 — forked from omarmousa074/index.html
yeti login
<form>
<div class="svgContainer">
<div>
<svg class="mySVG" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 200 200">
<defs>
<circle id="armMaskPath" cx="100" cy="100" r="100"/>
</defs>
<clipPath id="armMask">
<use xlink:href="#armMaskPath" overflow="visible"/>
</clipPath>