Skip to content

Instantly share code, notes, and snippets.

View matiasmoya's full-sized avatar

Matt Hinczuk matiasmoya

View GitHub Profile
package javaapplication11;
public class Domicilio {
String calle;
int altura;
public int getAltura() {
return altura;
}
public void setAltura(int altura) {
@matiasmoya
matiasmoya / app.coffee
Created August 12, 2015 15:25
Directive example using coffeescript within IonicAngular
angular
.module('myApp', [
'ionic'
'myapp.directives.hello'
])
.run ($ionicPlatform, $rootScope) ->
$ionicPlatform.ready ->
if window.cordova and window.cordova.plugins and window.cordova.plugins.Keyboard
cordova.plugins.Keyboard.hideKeyboardAccessoryBar true
cordova.plugins.Keyboard.disableScroll true
@matiasmoya
matiasmoya / project_index.rb
Created October 15, 2015 13:36
How to create ElasticSearch indexes using our gem easy_indexer
class ProjectIndex < EasyIndexer::Engine
index_name "project"
def search(criteria = {})
@page = criteria[:page].try(:to_i) || 1
@per_page = criteria[:per_page].try(:to_i) || 25
@search = {
query: {
@matiasmoya
matiasmoya / all_aggregations.json
Last active October 27, 2015 17:29
ElasticSearch collection of queries
{
"query": {
"match_all":{}
},
"aggs":{
"schools":{"terms":{"field": "schools", "size": 5}}
}
}
@matiasmoya
matiasmoya / test.rb
Created November 3, 2015 22:21
Create a Class CharCounter, should receive an String, and return the number of consecutive chars as string. I.E: aabbccaadd, should return a2b2c2a2d2
class CharCounter
attr_accessor :string
def initialize(string)
@string = string
end
def result
length = string.length
result = ''
@matiasmoya
matiasmoya / forms.html
Created November 7, 2015 17:39
Ionic material forms
<ion-view view-title="Activity">
<ion-content>
<div class="list">
<label class="item item-input item-floating-label"> <span class="input-label">First Name</span>
<input type="text" placeholder="First Name"> </label>
<label class="item item-input item-floating-label"> <span class="input-label">Last Name</span>
<input type="text" placeholder="Last Name"> </label>
<br />
<div class="item item-checkbox">
<label class="checkbox">
@matiasmoya
matiasmoya / gist:1bdab6bf10958afc868c
Created December 11, 2015 15:22
Updated MainViewController.m for Cordova iOS 4.0.x compatibility.
/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@matiasmoya
matiasmoya / GAME_MASTER_v0_1.protobuf
Created July 22, 2016 17:31 — forked from anonymous/GAME_MASTER_v0_1.protobuf
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {
@matiasmoya
matiasmoya / GAME_MASTER_v0_1.protobuf
Created July 22, 2016 17:31 — forked from nneonneo/GAME_MASTER_v0_1.protobuf
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: [10, 100, 1000]
}
}
Items {
@matiasmoya
matiasmoya / GAME_DATA_MOVES.json
Created July 22, 2016 17:32 — forked from rmkane/GAME_DATA_HISTORY.json
Pokemon GO - Game Data Statistics
[ {
"ID": 13,
"Name": "Wrap",
"Move Type": "Charge",
"Animation ID": 5,
"Type": "Normal",
"Power": 15,
"Accuracy Chance": 1,
"Stamina Loss Scalar": 0.06,
"Trainer Level Min": 1,