Skip to content

Instantly share code, notes, and snippets.

View harveyxia's full-sized avatar
🐺

Harvey Xia harveyxia

🐺
  • Reddit
  • Somerville, MA
  • 14:41 (UTC -05:00)
View GitHub Profile

Keybase proof

I hereby claim:

  • I am harveyxia on github.
  • I am harveyxia (https://keybase.io/harveyxia) on keybase.
  • I have a public key ASCzw5eID6FhgUrYjbVXLOpSFUCezrVz98A2IQtmGu2WYgo

To claim this, I am signing this object:

@harveyxia
harveyxia / _paginate.ejs
Created July 21, 2014 18:41
Pagination in ejs
<!-- provide these args: currentPage, totalPages, and queryParams -->
<!-- variables i and j control the number of pages to show on the left and right -->
<div class='pagination-container col-xs-12'>
<ul class='pagination pagination-lg'>
<% if (currentPage != 1) { %>
<li><a class='ajax' href="/<%= paginateItem %>/?page=<%= currentPage - 1 %><%= queryParams%>">&laquo;</a></li>
<% } else { %>
<li class='disabled'><a class='ajax' href="javascript:void(0)">&laquo;</a></li>
<% } %>
@harveyxia
harveyxia / v-align-css3
Created June 30, 2014 20:14
Vertically align using CSS3 transform
#parent > div {
position: relative;
top: 50%;
-webkit-transform: translateY(-50%);
}
/* source: http://zerosixthree.se/vertical-align-anything-with-just-3-lines-of-css/ */