Skip to content

Instantly share code, notes, and snippets.

@bwoods
bwoods / xbox_button_names.md
Created May 24, 2023 07:00 — forked from palmerj/xbox_button_names.md
Xbox Controller Button Names and Layout

Buttons

  • RSB == Right Stick Button
  • LSB == Left Stick Button
  • RB == Right Bumper
  • RT == Right Trigger
  • LB == Left Bumper
  • LT == Left Trigger
  • Y == Y Button (Top)
  • A == A Button (Bottom)
@bwoods
bwoods / Acknowledgements.swift
Last active August 26, 2018 00:01 — forked from eoghain/acknowledgements.py
Swift script to generate Acknowledgements.plists (in the Settings.bundle) for the licenses of open source software you are using in your application.
// env -i swift Application/Acknowledgements.swift > $CODESIGNING_FOLDER_PATH/Settings.bundle/Acknowledgements.plist
import Foundation
let fileManager = FileManager()
let folders = try! fileManager.contentsOfDirectory(atPath: fileManager.currentDirectoryPath).sorted()
var specifiers = [[ "Type" : "PSGroupSpecifier", "Title" : "Open Source", "FooterText" : "This application uses the following third party libraries:" ]]
folders.forEach { folder in
if let path = [ "LICENSE.md", "LICENSE", "COPYING" ].lazy.map({ "\(folder)/\($0)" }).first(where: { fileManager.fileExists(atPath: $0) }) {
var license = (try! String(contentsOfFile: path, encoding: .utf8).replacingOccurrences(of: "(c)", with: "©"))
@bwoods
bwoods / Github Flavored Markdown.md
Created March 26, 2018 05:41 — forked from stevenyap/Github Flavored Markdown.md
Github Flavored Markdown cheatsheet

Github Flavored Markdown (GFMD) is based on Markdown Syntax Guide with some overwriting as described at Github Flavored Markdown

Text Writing

It is easy to write in GFMD. Just write simply like text and use the below simple "tagging" to mark the text and you are good to go!

To specify a paragraph, leave 2 spaces at the end of the line

Headings

@bwoods
bwoods / PlatonicSolidsOfSoftwareConstruction.md
Last active December 31, 2017 10:24 — forked from bryanedds/PlatonicSolidsOfSoftwareConstruction.txt
The Platonic Solids of Software Construction and Their Realization in C

Six Platonic Solids of Software Construction

@bryanedds

No matter the business domain or programming language, programmers always end up needing support for ALL of these things in some form,

  • Resource Semantics (such as RAII in C++, or finalizers in C#)
  • Error Semantics (such as exceptions in most languages, or conditions in Common Lisp)
  • Algebraic Types (such as structs and unions in C, or records and DUs in F#)
  • Data Abstraction (such as that which is often badly entangled within object systems in OO languages)