Skip to content

Instantly share code, notes, and snippets.

View thiagoc7's full-sized avatar

Thiago thiagoc7

  • Money Project
  • Brasil
View GitHub Profile
@thiagoc7
thiagoc7 / data.rb
Last active February 23, 2016 20:14
optimal order
# static data
gasolines = [
{
id: 1,
name: 'Gas 1'
},
{
id: 2,
name: 'Gas 2'
}
@thiagoc7
thiagoc7 / .before.laptop.sh
Last active March 23, 2018 09:12
new mac
#!/usr/bin/env bash
set -eu
#
# Binary installer
#
# Check for Homebrew
if test ! $(which brew); then
echo "Installing homebrew..."
@thiagoc7
thiagoc7 / button-add.hbs
Created May 25, 2015 19:05
comp button-add hbs
<a href="#" class="btn btn-green dropdown-link" {{action 'toggleAdding'}}>{{buttonLabel}}</a>
{{#if isAddingValid}}
{{yield}}
{{/if}}
@thiagoc7
thiagoc7 / button-add.js
Created May 25, 2015 19:05
comp button-add js
import Ember from 'ember';
export default Ember.Component.extend({
classNames: ['dropdown-container'],
buttonLabel: 'Add Activity',
autoClose: false,
dropdowns: Ember.inject.service(),
isAddingSolo: true,
@thiagoc7
thiagoc7 / -create-activity.hbs
Created May 25, 2015 19:04
Add Activity partial
{{#comp/button-add autoClose=true}}
<div class="dropdown-box dropdown-box-items visible">
<ul class="list-items">
<li>
<a href="#" {{action 'createModal' 1}}>Expense</a>
</li>
<li>
<a href="#" {{action 'createModal' 2}}>Revenue</a>
</li>
@thiagoc7
thiagoc7 / gist:4a8b0e44ee4ed0df8614
Created February 13, 2015 10:46
ember-cli/scroll-to.js
import Em from 'ember';
var DURATION = 750;
var EASING = 'swing';
export default Em.Component.extend({
tagName: 'a',
href: null,
duration: DURATION,
//records
.minus, .plus { cursor: pointer; }
tbody + .table-tbody > .table-row-parent .table-cell { border-top: 1px solid #c1c1c1; }
.inline-action { visibility: hidden; }
.table-cell-group:hover .inline-action { visibility: visible; }
// bank statement
.cell-wraper-statement { width: 100%; height: 45px;}
.cell-wraper-statement-active { width: 100%; height: 55px;}
@thiagoc7
thiagoc7 / index.html
Created December 13, 2014 16:46
Ember.js • TodoMVC todo // source http://jsbin.com/goqola
<!doctype html>
<html>
<head>
<meta name="description" content="todo" />
<meta charset="utf-8">
<title>Ember.js • TodoMVC</title>
<style id="jsbin-css">
html,
body {
# If we save a record using ember-data's RESTadapter, and it fails, Rails
# returns the validation errors of the model as JSON hash:
#
# {"errors":{"name":["may not be blank"]}}
#
# This patches the RESTadapter to add these errors to the invalid record. It
# can be removed when the following Pull Request was merged into ember-data:
# https://github.com/emberjs/data/pull/376
DS.RESTAdapter.reopen
### Router.js.coffee
App.Router.reopen
rootURL: '/'
location: 'auto'
App.Router.map ->
@resource 'users', ->
@resource 'user', path: '/:id', ->
@route 'edit'