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
Show hidden characters
{ | |
// Theme and Color Scheme | |
// Color Scheme: Tomorrow Night – https://github.com/chriskempson/tomorrow-theme | |
// Theme: Soda – https://github.com/buymeasoda/soda-theme/ | |
"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme", | |
"theme": "Soda Dark 3.sublime-theme", | |
"soda_classic_tabs": true, // Classic tabs instead of boxy tabs | |
"soda_folder_icons": true, // Folders in the sidebar, instead of arrows | |
// Typeface and Typesetting |
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
// colorjs.js | |
// @description An implementation of how I did the color changing background | |
// on my site. Essentially, I'm using the HSLA color space because | |
// it makes it really easy to control the general lightness of a | |
// color and maintain it throughout a bunch of hues. For instance: | |
// take a look at http://cl.ly/SrT1. Notice how all the colors | |
// have the same contrast? That's because all that's changed between | |
// them is the hue values. That's what we're replicating here. | |
// | |
// @requirements jQuery –– http://jquery.com/ |
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
// blah blah pretend this is in a method and someText is a | |
// UILabel that's in self or something | |
[[self someItem] setText:@"This is some text"]; | |
// orrrrrr | |
self.someItem.text = @"This is some text"; |
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
answerLabel = [[UILabel alloc] initWithFrame:CGRectMake(35.0f, 132.0f, 260.0f, 54.0f)]; | |
answerLabel.font = [UIFont fontWithName:@"AvenirNext-DemiBold" size:45.0f]; | |
answerLabel.textAlignment = NSTextAlignmentRight; | |
answerLabel.numberOfLines = 1; | |
answerLabel.minimumScaleFactor = 8./answerLabel.font.labelFontSize; | |
answerLabel.text = @"BASKETBALL"; | |
/* | |
* Failing on line 7 - error: |
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
// Unsave from Pocket | |
// self.heldStoryPocketID – item ID for the story grabbed from the Pocket API | |
NSError *error; | |
NSArray *actions = @[@{@"action": @"delete", @"item_id": self.heldStoryPocketID}]; | |
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:actions options:kNilOptions error:&error]; | |
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; | |
NSDictionary *argDictionary = @{@"actions": jsonString}; |
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
// self.heldStoryPocketID – NSString containing the integer of the Pocket item ID grabbed from the API | |
NSError *error; | |
NSArray *actions = @[@{@"action": @"delete", @"item_id": self.heldStoryPocketID}]; | |
NSData *jsonData = [NSJSONSerialization dataWithJSONObject:actions options:kNilOptions error:&error]; | |
NSString *jsonString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; | |
NSDictionary *args = @{@"actions": jsonString}; | |
[[PocketAPI sharedAPI] callAPIMethod:@"send" withHTTPMethod:PocketAPIHTTPMethodPOST arguments:args handler:^(PocketAPI *api, NSString *apiMethod, NSDictionary *response, NSError *error) { | |
if (error) { |
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
str = "On a boredom scale of 1-10, I am: " | |
puts str + str.length |
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 <stdio.h> | |
main() { | |
char str[] = "On a boredom scale of 1-10, I am: "; | |
printf("%s %i", str, strlen(str)); | |
} |
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
NSString *str = @"On a boredom scale of 1-10, I am:"; | |
NSLog(@"%@ %lu", str, str.length); |
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
{ | |
"color_scheme": "Packages/Dayle Rees Color Schemes/sublime/peel.tmTheme", | |
"font_face": "Inconsolata", | |
"font_size": 16, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"line_padding_bottom": 4, | |
"line_padding_top": 4, |