Skip to content

Instantly share code, notes, and snippets.

View tomasbasham's full-sized avatar
🤓
I’d tell you a UDP joke... but you might not get it.

Tomas Basham tomasbasham

🤓
I’d tell you a UDP joke... but you might not get it.
View GitHub Profile
@tomasbasham
tomasbasham / yardoc_cheatsheet.md
Created October 1, 2017 18:44 — forked from chetan/yardoc_cheatsheet.md
YARD cheatsheet

YARD CHEATSHEET http://yardoc.org

cribbed from http://pastebin.com/xgzeAmBn

Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.

Modules

Namespace for classes and modules that handle serving documentation over HTTP

@tomasbasham
tomasbasham / install_tmux_osx_no_brew
Last active November 7, 2024 22:28 — forked from Fi5t/install_tmux_osx_no_brew
Install tmux on OSX WITHOUT brew
# Create a directory
mkdir ~/tmux-install
cd ~/tmux-install
# Get the files
curl -OL https://www.openssl.org/source/openssl-1.0.2l.tar.gz
curl -OL https://github.com/tmux/tmux/releases/download/2.3/tmux-2.3.tar.gz
curl -OL https://github.com/libevent/libevent/releases/download/release-2.0.22-stable/libevent-2.0.22-stable.tar.gz
# Extract them
@tomasbasham
tomasbasham / install.sh
Last active March 27, 2017 20:27
Arduino Library Test Script
#!/usr/bin/env bash
# The MIT License (MIT)
#
# Copyright (c) 2015 Adafruit Industries
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@tomasbasham
tomasbasham / Netflix.ino
Created June 12, 2016 15:05
Netflic Switch code
/**
* Netflix
*
* A program that emits an IR singal to startup
* Netflix on a smart TV, lights up an array of
* LED lights and signals a control unit that a
* button press has occurred using MQTT.
*
* Hardware: Particle Photon
* Concept Usage: Netflix and Chill Button
@tomasbasham
tomasbasham / UIImage+Scale.m
Last active February 1, 2024 19:04
Scale a UIImage to any given rect keeping the aspect ratio
@implementation UIImage (scale)
/**
* Scales an image to fit within a bounds with a size governed by
* the passed size. Also keeps the aspect ratio.
*
* Switch MIN to MAX for aspect fill instead of fit.
*
* @param newSize the size of the bounds the image must fit within.
* @return a new scaled image.