Skip to content

Instantly share code, notes, and snippets.

Avatar
💙
reacting

Eduardo P. Rivero eperedo

💙
reacting
View GitHub Profile
@eperedo
eperedo / route.js
Created Jan 27, 2016
Read xls, xlsx and csv files and return json object (inside a hapijs handler)
View route.js
handler: function (request, reply) {
const path = require('path');
const response = reply('success').hold();
const fileExtension = path.extname(request.payload.file.filename);
if (fileExtension === '.csv') {
View StandardController.js
(function () {
'use strict';
angular
.module('myApp', [])
.controller('UserController', UserController);
function UserController ($log) {
@eperedo
eperedo / package.json
Last active Jul 20, 2016
Commitizen configuration including ghooks for validation messages, commits and push
View package.json
{
"name": "[package-name]",
"description": "",
"main": "src/index.js",
"version": "0.0.0-semantic-release",
"scripts": {
"commit": "git-cz",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -w -r 0",
"coverage": "istanbul cover node_modules/tape/bin/tape -- tape src/**/*.test.js",
"dev": "nodemon src/server.js --ignore '*.test.js'",
@eperedo
eperedo / .eslintignore
Last active Feb 19, 2016
Eslint config for abakio projects
View .eslintignore
src/**/*.test.js
@eperedo
eperedo / web.config
Created Nov 26, 2015
web config for angular apps
View web.config
<?xml version="1.0"?>
<configuration>
<system.webServer>
<staticContent>
<clientCache cacheControlMode="UseExpires"
httpExpires="Tue, 19 Jan 2038 03:14:07 GMT" />
</staticContent>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" stopProcessing="true">
@eperedo
eperedo / sublime-settings
Created Oct 24, 2015
Sublime Text 3 Config
View sublime-settings
{
"caret_extra_bottom": 0,
"caret_extra_top": 0,
"caret_extra_width": 1,
"color_scheme": "Packages/Seti_UI/Scheme/Seti.tmTheme",
"default_line_ending": "unix",
"folder_exclude_patterns":
[
".idea",
"node_modules",
View age.js
angular
.module('common')
.filter('age', ageFilter);
function ageFilter () {
return function (input, params) {
if (input) {
@eperedo
eperedo / gulpfile.js
Created Oct 15, 2015
Browser sync with gulp
View gulpfile.js
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
// Static server
gulp.task('default', ['browser-sync']);
gulp.task('browser-sync', function() {
browserSync.init({
server: {
View main.css
.row-item {
-webkit-transition: color 0.6s, background-color 0.3s ease-out 1s;
-moz-transition: color 0.6s, background-color 0.3s ease-out 1s;
-ms-transition: color 0.6s, background-color 0.3s ease-out 1s;
transition: color 0.1s, background-color 0.8s ease-out 1s;
}
.row-item.ng-enter {
background-color: #FFF1CC;
-webkit-animation: bounceInRight 1s;
View meeting.json
{
"name": "Daily Meeting",
"organization_id" : 1,
"start_date" : "11/2/2013"
"content" : [
{
"question" : "Question Number 1?",
"answer" : "Answer number 1"
},
{
You can’t perform that action at this time.