Skip to content

Instantly share code, notes, and snippets.

View mgonto's full-sized avatar

Martin Gontovnikas mgonto

View GitHub Profile
@mgonto
mgonto / keybase.md
Created April 7, 2016 01:29
keybase.md

Keybase proof

I hereby claim:

  • I am mgonto on github.
  • I am mgonto (https://keybase.io/mgonto) on keybase.
  • I have a public key whose fingerprint is 1316 6AE9 2A45 7160 296C DC12 7620 77C0 02B8 68CF

To claim this, I am signing this object:

@mgonto
mgonto / .gitignore
Last active November 19, 2015 21:57
Minimal WebTask Runner
node_modules/
@mgonto
mgonto / code.js
Created April 13, 2015 19:38
webtaskcode
return function(cb) { cb(null, {name: "Hello my dear friend"}); }
@mgonto
mgonto / Calling API
Created October 1, 2014 15:13
Angular
var request = new Request();
request.url = bla;
// Header sent automatically
request.make();
var request = new Request();
request.url = bla
request.header = {
// If he used session
Authorization: 'Bearer ' + A0Session.store.idToken
}
request.make();
@mgonto
mgonto / reactive.html
Created May 23, 2014 22:04
Reactive Example
<div data-repat="app in AppTypes" data-class="app.name">
<div data-class="{selected: app.selected}"></div>
<a on-click="apptypeselect(app)">{{app.name}}</a>
</div>

Keybase proof

I hereby claim:

  • I am mgonto on github.
  • I am mgonto (https://keybase.io/mgonto) on keybase.
  • I have a public key whose fingerprint is 7EB8 3BE2 F562 C3BF FCDF 6E21 3DC1 36F4 164A E6CC

To claim this, I am signing this object:

def max_contiguous_submatrix_n3(m)
rows = m.count
cols = rows ? m.first.count : 0
vps = Array.new(rows)
for i in 0..rows
vps[i] = Array.new(cols, 0)
end
for j in 0...cols
@mgonto
mgonto / one.scala
Created November 12, 2013 00:31
Scala Reactive
def heapList(heap: H): List[A] = {
if (isEmpty(heap)) {
Nil
} else {
findMin(heap) :: heapList(deleteMin(heap))
}
}
property("Added and removed elements") = forAll { (h: H, values: List[A]) =>
val listOfElemsBefore = heapList(h)
@mgonto
mgonto / event.js
Created June 4, 2013 02:33
Angularytics Track event with service
angular.controller('MainCtrl', function(Angularytics, $scope) {
$scope.click = function() {
Angularytics.trackEvent("Home Category", "Button clicked");
}
});