Skip to content

Instantly share code, notes, and snippets.

View mickmaccallum's full-sized avatar
🤘

Mick MacCallum mickmaccallum

🤘
View GitHub Profile
@mickmaccallum
mickmaccallum / gist:1cf2f8e6d3f27681bce1
Created April 3, 2015 12:02
Get Tweets for certain user in Swift
let username = "myHandle" // Put Twitter handle without @ here.
let accountStore = ACAccountStore()
let accountType = accountStore.accountTypeWithAccountTypeIdentifier(ACAccountTypeIdentifierTwitter)
accountStore.requestAccessToAccountsWithType(accountType, options: nil) { granted, error in
if granted == true {
if let account = accountStore.accountsWithAccountType(accountType).first as? ACAccount {
let finalURL = "https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=" + username + "&count=100"
@mickmaccallum
mickmaccallum / gist:589c6c177f9a502dec66
Last active August 29, 2015 14:18
Jekyll posts by category with HTML description list (dl)
<section class="posts">
{% for category in site.categories %}
<dl>
<dt>
{{ category | first | capitalize }}
</dt>
{% for posts in category %}
{% for post in posts %}
{% if post.url %}