Skip to content

Instantly share code, notes, and snippets.

Jim Chang zxcvbnm4709

Block or report user

Report or block zxcvbnm4709

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View PlacesViewController.m
#import "HFAppDelegate+FBAuthentication.h"
- (void)viewDidLoad {
[super viewDidLoad];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(sessionStateChanged:)
name:HFSessionStateChangedNotification
object:nil];
}
@zxcvbnm4709
zxcvbnm4709 / gist:3968572
Created Oct 28, 2012
response from heroku in console
View gist:3968572
<!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 Jun 25, 2012
Edit monit configuration file in /etc/monit/monitrc
View 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 Jun 2, 2012 — forked from mislav/pagination.md
"Pagination 101" by Faruk Ateş
View pagination.md

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

View dabblet.html
<!-- content to be placed inside <body>…</body> -->
@zxcvbnm4709
zxcvbnm4709 / dabblet.css
Created May 12, 2012 — forked from jackie/dabblet.css
FizzBuzz with CSS
View dabblet.css
/**
* FizzBuzz with CSS
*/
body {
counter-reset: fizzbuzz;
}
div {
@zxcvbnm4709
zxcvbnm4709 / gist:2656197
Created May 10, 2012
include jQuery in Chrome Console
View gist:2656197
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 Jan 17, 2012
understanding object mapping of RestKit
View RKObjectMapping.h
//
// 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 Nov 28, 2011
heroku logs 爆炸
View gist:1399495
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)
You can’t perform that action at this time.