Skip to content

Instantly share code, notes, and snippets.

View mshamma's full-sized avatar

Mohammed Shamma mshamma

View GitHub Profile
import Ember from 'ember';
export default Ember.Component.extend({
tagName: "section",
page: 1,
paginateBy: 10,
paginatedItems: Ember.computed('amenities', 'page', function(){
var i = (parseInt(this.get('page')) - 1) * parseInt(this.get('paginateBy'));
var j = i + parseInt(this.get('paginateBy'));
return this.get('items').slice(i, j);
@phalt
phalt / main.go
Created December 3, 2014 14:51
Simple HTTP API in Go
package main
import (
"github.com/gin-gonic/gin"
"database/sql"
"github.com/coopernurse/gorp"
_ "github.com/mattn/go-sqlite3"
"log"
"time"
"strconv"
@staltz
staltz / introrx.md
Last active June 15, 2024 12:24
The introduction to Reactive Programming you've been missing