This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "ofMain.h" | |
class ofApp : public ofBaseApp { | |
public: | |
string str = ""; | |
void setup() { | |
ofBackground(0); | |
ofSetFrameRate(60); | |
ofSetVerticalSync(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define LED_PIN 9 | |
void setup() { | |
pinMode(LED_PIN, OUTPUT); | |
} | |
void loop() { | |
pulseLED(); | |
// breatheLED(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIView { | |
@IBInspectable var cornerRadius: CGFloat { | |
get { | |
return layer.cornerRadius | |
} | |
set { | |
layer.cornerRadius = newValue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UILabel { | |
@IBInspectable var kerning: Float { | |
get { | |
var range = NSMakeRange(0, (text ?? "").characters.count) | |
guard let kern = attributedText?.attribute(NSKernAttributeName, at: 0, effectiveRange: &range), let value = kern as? NSNumber else { | |
return 0 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
extension UIImage { | |
convenience init(color: UIColor, size: CGSize = CGSize(width: 10, height: 10)) { | |
let rect = CGRect(x: 0, y: 0, width: size.width, height: size.height) | |
UIGraphicsBeginImageContextWithOptions(rect.size, false, 0) | |
let context = UIGraphicsGetCurrentContext()! | |
context.setFillColor(color.cgColor) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tap "argon/mas" | |
tap "brewsci/science" | |
tap "heroku/brew" | |
tap "homebrew/bundle" | |
tap "homebrew/cask" | |
tap "homebrew/cask-drivers" | |
tap "homebrew/cask-fonts" | |
tap "homebrew/core" | |
tap "rcmdnk/file" | |
brew "bundletool" |