Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mkral on github.
  • I am mlkral (https://keybase.io/mlkral) on keybase.
  • I have a public key ASCgBeETkPGeqGkR-16HKloa09X_UnwMee2gKo_2GU1wgwo

To claim this, I am signing this object:

@mkral
mkral / gist:b85de9422bdc1517c0e5acbb73989e55
Created January 31, 2018 00:38
Arduino + Stranger Things
#include <Adafruit_NeoPixel.h>
#define PIN 6
// Parameter 1 = number of pixels in strip
// Parameter 2 = pin number (most are valid)
// Parameter 3 = pixel type flags, add together as needed:
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs)
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers)
// NEO_GRB Pixels are wired for GRB bitstream (most NeoPixel products)
@mkral
mkral / XIBDesignable.swift
Last active August 20, 2017 10:19
XIBDesignable
//
// XIBDesignable.swift
//
// Created by Michael Kral on 8/15/17.
//
import UIKit
protocol XIBDesignable {
func xibSetup()
}
@mkral
mkral / gist:4982488
Created February 19, 2013 02:06
Stretchable UIImage On Button
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(100, 100, 320, 44)];
UIImage *backgroundImage = [[UIImage imageNamed:@"whiteButtonWithArrow"] stretchableImageWithLeftCapWidth:6 topCapHeight:0];
[button setBackgroundImage:backgroundImage forState:UIControlStateNormal];
@mkral
mkral / gist:4696421
Last active December 12, 2015 02:08
My Resume