Skip to content

Instantly share code, notes, and snippets.

View MarioRicalde's full-sized avatar

Mario Ricalde MarioRicalde

View GitHub Profile
@MarioRicalde
MarioRicalde / Pagination101.md
Created May 27, 2012 08:00 — 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

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
</head>
<body>
<div id="site-wrapper">
@MarioRicalde
MarioRicalde / useful_shell_commands.md
Created July 25, 2014 23:28
List of useful commands for day to day development.

Search Files

Search a file called httpd.conf in all directories:

find / -type f -name httpd.conf

Execute a command on all .conf files.

find / -type f -name httpd.conf -exec chmod 0700 {} \;
@MarioRicalde
MarioRicalde / Capybara Cheat Sheet
Created July 25, 2014 08:04 — forked from zhengjia/capybara cheat sheet
A Capybara Cheat Sheet.
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@MarioRicalde
MarioRicalde / css_resources.md
Created July 25, 2014 07:57 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@MarioRicalde
MarioRicalde / rails_resources.md
Created July 25, 2014 07:57 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@MarioRicalde
MarioRicalde / javascript_resources.md
Created July 25, 2014 07:57 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@MarioRicalde
MarioRicalde / tmux-cheatsheet.markdown
Created July 25, 2014 07:56 — forked from MohamedAlaa/tmux-cheatsheet.markdown
A comprensive cheat-sheet for everything Tmux.

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@MarioRicalde
MarioRicalde / imgdim.sh
Last active August 29, 2015 13:56
Copy the image dimensions as CSS via Terminal.
function imgdim() {
echo "Image Dimensions copied to the Clipboard."
sips -g pixelHeight -g pixelWidth $1 | sed '1 d' | sed 's/ pixelHeight: \(.*\)/height: \1px;/' | sed 's/ pixelWidth: \(.*\)/width: \1px;/' | pbcopy
}