Skip to content

Instantly share code, notes, and snippets.

View dennislysenko's full-sized avatar

Dennis Lysenko dennislysenko

View GitHub Profile
//
// SpotifyTabAdapter.m
// BeardedSpice
//
// Created by Dennis Lysenko on 4/4/15.
// Copyright (c) 2015 Tyler Rhodes / Jose Falcon. All rights reserved.
//
#import "SpotifyTabAdapter.h"
#import "runningSBApplication.h"
@dennislysenko
dennislysenko / gist:f8e804eeec91df4f0c0c
Created April 6, 2015 16:46
[UIViewController fubar] -- method to recursively color the view hierarchy
- (void)fubar
{
[self fubarWithViews:self.view.subviews];
}
- (void)fubarWithViews:(NSArray *)views
{
for (UIView *view in views) {
CGFloat hue = ( arc4random() % 256 / 256.0 ); // 0.0 to 1.0
CGFloat saturation = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from white
CGFloat brightness = ( arc4random() % 128 / 256.0 ) + 0.5; // 0.5 to 1.0, away from black
@dennislysenko
dennislysenko / gist:fcc65bcf24c94af82a47
Created April 5, 2015 03:42
Spotify Cocoa ScriptingBridge Header
//
// Spotify.h
// BeardedSpice
//
// Created by Dennis Lysenko on 4/4/15.
// Copyright (c) 2015 Tyler Rhodes / Jose Falcon. All rights reserved.
//
/*
* Spotify.h