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
def valid_channel_name(name): | |
"""Channel names can only contain lowercase letters, | |
numbers, hyphens, and underscores, and must be 21 characters or less. | |
Some sample conversions from Slack to determine some heuristics: | |
1..................20abc def => 1_20abc-def | |
1..................20abc..def => 1_20abc_def | |
Heuristics: | |
1. Encode input into ASCII |
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
Prerequisites | |
* SHOUTcast (http://www.shoutcast.com/BroadcastNow) | |
* Soundflower (https://rogueamoeba.com/freebies/soundflower/) | |
* butt (http://butt.sourceforge.net/) | |
* a computer | |
Set up Soundflower | |
* After installing Soundflower, set it as Output source in System Preferences |
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
let intArray = [ | |
[0xff2929, 0x00bdd1], | |
[0x00ea00, 0xff4fff], | |
[0x00bdd1, 0xbd10e0], | |
[0x00ea00, 0x00bdd1], | |
[0xbd10e0, 0xff2929], | |
[0xff4fff, 0x00bdd1], | |
[0x00bdd1, 0x00ea00], | |
[0xff2929, 0x00ea00], | |
[0x00bdd1, 0xff2929], |
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
2014-05-10 22:14:41.541 Chelsea[3454:60b] Searching for venues... | |
2014-05-10 22:14:41.555 Chelsea[3454:60b] Auth token for request: KAOMWNNZOW1OGCGODJIWAZRLG5KAPLMGBFIGX5JKYJ2JVT53 | |
2014-05-10 22:14:41.556 Chelsea[3454:60b] Verified date for request: 20140417 | |
2014-05-10 22:14:41.557 Chelsea[3454:60b] Request parameter dictionary: { | |
intent = checkin; | |
limit = 5; | |
ll = "40.720272,-74.010767"; | |
"oauth_token" = KAOMWNNZOW1OGCGODJIWAZRLG5KAPLMGBFIGX5JKYJ2JVT53; | |
query = home; | |
radius = 1000; |
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
- (NSArray *)getLinesArrayOfStringInLabel:(UILabel *)label | |
{ | |
NSString *text = [label text]; | |
UIFont *font = [label font]; | |
CGRect rect = [label frame]; | |
CTFontRef myFont = CTFontCreateWithName((__bridge CFStringRef)([font fontName]), [font pointSize], NULL); | |
NSMutableAttributedString *attStr = [[NSMutableAttributedString alloc] initWithString:text]; | |
[attStr addAttribute:(NSString *)kCTFontAttributeName value:(__bridge id)myFont range:NSMakeRange(0, attStr.length)]; | |