Skip to content

Instantly share code, notes, and snippets.

View Epotignano's full-sized avatar
🎯
Focusing

Emiliano Potignano Epotignano

🎯
Focusing
View GitHub Profile
Hello Daniel, I'm having a problem when I'm trying to run the server in my machine, I have ruby2.0.0 in Ubuntu 14.04
Bundler can't install this:
Gem::InstallError: byebug requires Ruby version >= 2.0.0.
An error occurred while installing byebug (2.7.0), and Bundler cannot continue.
Make sure that `gem install byebug -v '2.7.0'` succeeds before bundling.
When I run this
// adentro de la directiva
$http.get(/*URL a donde pedis los datos*/)
.success(function(response){
scope.var = response
})
.error(function(response){
/**Handle error**/
})
/************** schemas/usersSchema *************
var mongoose = require('mongoose');
var Schema = require('mongoose').Schema;
var bcrypt = require('bcrypt-nodejs')
var util = require('util');
var fashionTypes = require('../configs/referenceValues').fashionTypes;
function AbstractUserSchema() {
Schema.apply(this, arguments);
serv.match = function(collection,propertyToMatch, query) {
var sync;
/*if(propertyToMatch.indexOf(".") != -1) {
var properties = propertyToMatch.split(".");
sync = $firebase(ref.child(collection).child(properties[0]).child(properties[1]).orderByChild(properties[1]).startAt(query).endAt(query+"~"));
} else {*/
sync = $firebase(ref.child(collection).orderByChild(propertyToMatch).startAt(query).endAt(query+"~"));
// }
var matchPromise = $q.defer();
var binaryTree = new BTree(values) //values are a collection of values for the node of the binaryThree
var recursiveIteration = function(node, numberToSearch) {
if(node.value == numberToSearch) return node.position;
if(!!node.leftChild.exists() && !!node.rightChild.exists()) return 'Nothing matchs, check other branch'
recursiveIteration(node.child)
}
var searchValInTree = function (numberToSearch, tree ) { //number is the value to search
var top = tree.level(1)
@Epotignano
Epotignano / usingSomeForFilter.js
Last active September 12, 2015 15:00
Using the array.some method for a filter.
.constant('geslachtOptions', [
{'value': 'M', 'label': 'Man'},
{'value' : 'V', 'label': 'Vrouw'},
{'value': 'O', 'label': 'Onbekend'}
])
.filter('geslachtFilter', function(geslachtOptions){
return function(input) {
if(input) {
/**
* Created by emiliano on 04/02/15.
*/
angular.module('exampleApp.auth')
.service('AuthTokenService', function AuthTokenService(gettext, $state, $localStorage, $firebaseAuth, $firebaseObject, $q, $window, fireRef, UserService) {
var service = this;
var ref = new Firebase(fireRef);
var auth = $firebaseAuth(ref);
<nav-bar>
<dropdown class="visible-sm"></dropdown>
</nav-bar>
<side-bar class="col-md-3 hidden-sm">
<!--- elements of the menu -->
</side-bar>
<div class="container-fluid">
<div class="row">
<!-- the messages -->
module app.services {
interface ICoursesService {
getCollection():void;
get(courseId);
create(courseObj);
update(courseObj, courseId);
remove(courseId);
}
@Epotignano
Epotignano / gatsby-config-example.js
Last active November 23, 2019 05:06
gatsby-config for integrate Prismic and Gatsby Image
plugins: [
/**
Something else that you have in your config
**/
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,