Skip to content

Instantly share code, notes, and snippets.

View Juraci's full-sized avatar
🏠
Working from home

Juraci de Lima Vieira Neto Juraci

🏠
Working from home
  • Lagoa Vermelha - Brazil
View GitHub Profile
@Juraci
Juraci / router.js
Created September 28, 2016 00:52
Route
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('games');
@Juraci
Juraci / components.games-list.js
Last active September 28, 2016 18:19
Components
import Ember from 'ember';
export default Ember.Component.extend({
amountOfgames: Ember.computed('games', function() {
return this.get('games.length');
})
});
@Juraci
Juraci / await-promises.js
Last active October 13, 2016 20:07
Points to consider before using async await
// - It will be one more preset as dependency
// - Await doesn't replace promises it works with promises so we will still use promises
// - It's another concept for an already complex project (think about the onboarding)
// - With promise we have error handling out of the box 'catch', with await we need to add try catch everywhere
// This will be in parallel
getFoo().then((message) => {
console.log(message);
});
@Juraci
Juraci / es2015-route-beforetranspiling.js
Created November 14, 2016 15:59
ES 2015 Node.js code
import express from 'express';
import bodyParser from 'body-parser';
import GoalsController from '../controllers/goals';
const router = express.Router();
const jsonParser = bodyParser.json();
export default (datasource) => {
const Goal = datasource.models.Goal;
const goalsController = new GoalsController(Goal);
@Juraci
Juraci / es5-route-after-transpiling.js
Created November 14, 2016 16:08
After transpiling with es2015 preset
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _express = require('express');
var _express2 = _interopRequireDefault(_express);
@Juraci
Juraci / es2015-router-after-preset-node6.js
Created November 14, 2016 16:20
After transpiling with babel-preset-node6
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _express = require('express');
var _express2 = _interopRequireDefault(_express);
@Juraci
Juraci / components.sensor-item.js
Last active April 13, 2017 12:45
Computed properties in components
import Ember from 'ember';
export default Ember.Component.extend({
messages: [],
alertAmount: Ember.computed('messages.length', function() {
return this.get('messages.length');
}),
init() {
this._super(...arguments);
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
FACTER_ipaddress='<ip>' FACTER_role='devbox' puppet agent --onetime --no-daemonize --verbose --certname debian.nitro.devbox --color=false --server production-puppet-master.powerhrg.com --detailed-exitcodes || [ $? -eq 2 ]
Stdout from the command:
Exiting; no certificate found and waitforcert is disabled
== 20170818150820 AddSystemSizeForSolarRoofingDesigns: migrated (6.8375s) =====
mysqldump: Got error: 1449: The user specified as a definer ('dim'@'%') does not exist when using LOCK TABLES
rake aborted!
failed to execute:
mysqldumpPlease check the output above for any errors and make sure that `mysqldump` is installed in your PATH and has proper permissions.
Placa Mãe: 1349,90
https://www.kabum.com.br/produto/84280/placa-mae-asus-p-intel-lga-1151-atx-maximus-ix-hero-z270-ddr4-usb-3-1-tipo-a-e-c-aura-sync-audio-gamer-sli-cfx-rede-intel-2-m-2-hdmi-dp
Processador: 1337,90
https://www.kabum.com.br/produto/84404/processador-intel-core-i7-7700k-kaby-lake-7a-geracao-cache-8mb-4-2ghz-4-5ghz-max-turbo-lga-1151-intel-hd-graphics-630-bx80677i77700k
VGA: 1799,90
https://www.kabum.com.br/produto/83702/placa-de-video-vga-nvidia-evga-geforce-gtx-1070-sc-8gb-ddr5-black-edition-08g-p4-5173-kr-/?tag=gtx%201070
Fonte: 848,90