Skip to content

Instantly share code, notes, and snippets.

View cdl's full-sized avatar

Colby Ludwig cdl

View GitHub Profile
@cdl
cdl / pocket-wat.m
Created March 3, 2014 19:39
For some reason this doesn't seem to be deleting things from my Pocket account.
// 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};
// 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) {
str = "On a boredom scale of 1-10, I am: "
puts str + str.length
#include <stdio.h>
main() {
char str[] = "On a boredom scale of 1-10, I am: ";
printf("%s %i", str, strlen(str));
}
NSString *str = @"On a boredom scale of 1-10, I am:";
NSLog(@"%@ %lu", str, str.length);
{
"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,
-- Section for example.com
VirtualHost "example.com"
enabled = false -- Remove this line to enable this host
-- Assign this host a certificate for TLS, otherwise it would use the one
-- set in the global section (if any).
-- Note that old-style SSL on port 5223 only supports one certificate, and will always
-- use the global one.
ssl = {
# Edit zshrc
alias zshrc='subl ~/.zshrc'
# Edit this file
alias aliases='subl ~/.aliases'
# Copy public SSH key
alias sshkey='cat ~/.ssh/id_rsa.pub | pbcopy && echo Your SSH key has been copied to the clipboard.'
# fuck
body {
font-family: "Raleway";
margin: 0px;
color: #222222;
width: 100%;
height: 100%;
background-color: #eee9e2;
background-image: url("bg.png")
[19:48:37] <+ELLIOTTCABLE> Spend a weekend on reading about Objective-C's internals. (Suggest mikeash's archives, NSHipster, maybe furbo's writing too), and build something *exclusively* in ISO C.
[19:49:19] <+ELLIOTTCABLE> something difficult, or mind-bending, too. Something that's not necessarily familiar territory for you. (Scheme implementation! Or Paws! Or perhaps a simple database. I'm sure you can come up with something.)
[19:49:44] <+ELLIOTTCABLE> if that drags on into a second weekend (idk your schedule, but, you get my point), then that's okay. let it, that's important foundation.
[19:50:33] <+ELLIOTTCABLE> Then, a second weekend, thoroughly learning Scheme or Common Lisp. IMO, you don't really need to write anything complex in it to grok the parts you need to, at this point; it's more learning to “speak the language,” especially if you want to start reading more meaty CS stuff.
[19:51:16] <+ELLIOTTCABLE> Finally, dive into Ruby and JavaScript. You'll have a different perspective on things