Skip to content

Instantly share code, notes, and snippets.

View alvincrespo's full-sized avatar
:shipit:
Shipping Code.

Alvin Crespo alvincrespo

:shipit:
Shipping Code.
View GitHub Profile
@alvincrespo
alvincrespo / gist:d8ac025b2dc5b69ea4ad
Created July 29, 2014 14:12
Ember Object Dynamic Attributes
import Ember from 'ember';
export default Ember.Object.extend({
attrs: {},
attributes: function(){
var attrs = this.get('attrs');
var _this = this;
for (var attribute in attrs) {
(function(){
@alvincrespo
alvincrespo / gist:99586f1d213e6a25496b
Created December 28, 2014 20:03
Ruby on Rails w/ Docker + Rbenv
FROM ubuntu:14.04
MAINTAINER Alvin Crespo <[email protected]>
RUN apt-get update
RUN apt-get install -y git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev software-properties-common python-software-properties
RUN apt-get clean
# Install Rbenv
RUN git clone git://github.com/sstephenson/rbenv.git /root/.rbenv
@alvincrespo
alvincrespo / gist:6c402e99f985ccb35129
Created April 1, 2015 16:01
Missing template processor
{
"name": "fly-components",
"version": "0.0.0",
"description": "The default blueprint for ember-cli addons.",
"directories": {
"doc": "doc",
"test": "tests"
},
"scripts": {
"start": "ember server",
@alvincrespo
alvincrespo / gist:23f3ded45a712b8b47ef
Created April 1, 2015 16:27
The value that #each loops over must be an Array
import Ember from 'ember';
export default Ember.Controller.extend({
headers: ['Scare', 'Total'],
data: [{ scare: 'Sullivan', total: 100232 }, { scare: 'Randall', total: 99905 }, { scare: 'Ranft', total: 79405 }],
scare: 'Jon',
total: 2
});
package controllers
import (
"encoding/json"
"fmt"
"log"
"net/http"
"time"
"todos/models"
@alvincrespo
alvincrespo / gist:35b50a475f041b24f20b
Created May 11, 2015 16:57
Setting up Node in Ubuntu
# Reference: http://blog.izs.me/post/87525128203/how-to-install-node-js-and-npm-on-ubuntu-14-04
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
# This step is optional. At the moment Chris Lea’s PPA will give you npm 1.4.9,
# which is recent enough to have no showstopper # problems (the version that comes
# with apt, 1.3.10, is not terrible but has some known bugs).
@alvincrespo
alvincrespo / gist:f864fa846d3fc9364475
Last active August 29, 2015 14:21
fly-css-framework/src/styles/states/_panel.scss
// Components :: Panels
// Panels
//
// Panels are one the more versatile component within the Fly framework. They are used to provide visual sectioning for content. Panels provid a subtle border, and content placed within a ``.fly-panel-body`` is provided with padding.
//
// Styleguide 3.25
// Basic Panel
//
@alvincrespo
alvincrespo / gist:9e57623dcf60265bca2f
Last active August 18, 2022 17:34
fly-components/addon/components/fly-panel.js
// fly-components/addon/components/fly-panel.js
import Ember from 'ember';
import layout from '../templates/components/fly-panel';
export default Ember.Component.extend({
tagName: 'div',
classNames: ['fly-panel'],
layout: layout,
header: null,
subHeader: null,
@alvincrespo
alvincrespo / gist:930af53d0252b6025597
Last active August 29, 2015 14:21
ui/app/pods/cio-insights
// ui/app/pods/cio-insights/component.js
import Ember from 'ember';
import FlyPanelComponent from 'fly-components/components/fly-panel';
import { computedReads, notEmpty } from 'cio/utils/ember-helpers';
export default FlyPanelComponent.extend({
classNames: ['cio-insight'],
event: null,
filter: null,
@alvincrespo
alvincrespo / ember-api-versioned.sh
Last active October 11, 2015 22:10
Viewing versioned Ember.js API docs
git clone [email protected]:emberjs/website ember-api-1-13
cd ember-api-1-13
git checkout v1.13.7
bundle install
middleman
open http://localhost:4567/api/