Skip to content

Instantly share code, notes, and snippets.

#import "HFAppDelegate+FBAuthentication.h"
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(sessionStateChanged:)
name:HFSessionStateChangedNotification
object:nil];
}
@zxcvbnm4709
zxcvbnm4709 / gist:3968572
Created October 28, 2012 13:19
response from heroku in console
<!DOCTYPE html>
<html>
<head>
<title>The page you were looking for doesn't exist (404)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
@zxcvbnm4709
zxcvbnm4709 / monitrc
Created June 25, 2012 03:09
Edit monit configuration file in /etc/monit/monitrc
set daemon 120
set logfile syslog facility log_daemon
set mailserver smtp.gmail.com port 587 username "user@domain.com" password "userpassword" using tlsv1,
with timeout 15 seconds
set eventqueue
basedir /var/monit
slots 1000
@zxcvbnm4709
zxcvbnm4709 / pagination.md
Created June 2, 2012 15:59 — forked from mislav/pagination.md
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o

<!-- content to be placed inside <body>…</body> -->
@zxcvbnm4709
zxcvbnm4709 / dabblet.css
Created May 12, 2012 02:21 — forked from jackie/dabblet.css
FizzBuzz with CSS
/**
* FizzBuzz with CSS
*/
body {
counter-reset: fizzbuzz;
}
div {
@zxcvbnm4709
zxcvbnm4709 / gist:2656197
Created May 10, 2012 22:06
include jQuery in Chrome Console
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
@zxcvbnm4709
zxcvbnm4709 / RKObjectMapping.h
Created January 17, 2012 02:32
understanding object mapping of RestKit
//
// RKObjectMapping.h
// RestKit
//
// Created by Blake Watters on 4/30/11.
// Copyright 2011 Two Toasters. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "RKObjectMappingDefinition.h"
@zxcvbnm4709
zxcvbnm4709 / gist:1399495
Created November 28, 2011 07:39
heroku logs 爆炸
2011-11-28T07:34:52+00:00 app[web.1]: => Booting WEBrick
2011-11-28T07:34:52+00:00 app[web.1]: => Rails 3.1.0 application starting in production on http://0.0.0.0:52360
2011-11-28T07:34:52+00:00 app[web.1]: => Call with -d to detach
2011-11-28T07:34:52+00:00 app[web.1]: => Ctrl-C to shutdown server
2011-11-28T07:34:52+00:00 app[web.1]:
2011-11-28T07:34:52+00:00 app[web.1]:
2011-11-28T07:34:52+00:00 app[web.1]: Started GET "/" for 114.24.63.172 at 2011-11-28 07:34:52 +0000
2011-11-28T07:34:52+00:00 app[web.1]: Processing by PollsController#index as HTML
2011-11-28T07:34:52+00:00 app[web.1]: Rendered common/_user_nav.html.erb (1.2ms)