Skip to content

Instantly share code, notes, and snippets.

View salomvary's full-sized avatar

Márton Salomváry salomvary

View GitHub Profile
@salomvary
salomvary / apply.bind.js
Last active August 29, 2015 13:57
Finally found a reason to use Function.prototype.apply.bind
test(function() {
[
['foo', 'bar', 'baz'],
['fuz', 'barz', 'bazz'],
['fux', 'bax', 'bazx']
].forEach(Function.apply.bind(function(input1, input2, expectedOutput) {
assertEquals(subject(input1, input2), expectedOutput)
}, this))
})
// Yes, I know there are other (less cryptic) ways to achieve this :)
@salomvary
salomvary / alphabet.markdown
Last active August 29, 2015 14:05
Bulgarian
Name Description
Help Display the help window.
Close Closes a window
Letter Pronounciation
А а А а a in father
Б б Б б b in bat
В в В в v in van
@salomvary
salomvary / gist:aa16564410e8d1fad7e4
Created November 12, 2014 09:18
Scala type ascription
scala> class Foo
defined class Foo
scala> class Bar extends Foo
defined class Bar
scala> new Foo
res6: Foo = Foo@3ace5360
scala> new Bar
ngrep -d tap0 -W byline port 80
@salomvary
salomvary / Scala❤Java❤JavaScript.scala
Created November 26, 2014 22:00
Scala❤Java❤JavaScript
/**
* Usage:
* scalac Main.scala
* scala com.example.Main
*/
package com.example
import java.util.function.Function
import javax.script.ScriptEngineManager
Process: SoundCleod [31653]
Path: /Applications/SoundCleod.app/Contents/MacOS/SoundCleod
Identifier: sc.SoundCleod
Version: 0.17 (0.17)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: SoundCleod [31653]
User ID: 502
Date/Time: 2015-01-12 11:35:35.447 -0500
@salomvary
salomvary / gist:53da16e4ab13c4c34f53
Created May 15, 2015 09:13
Safari vs. WebView UserAgent
Safari:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/600.6.3 (KHTML, like Gecko) Version/7.1.6 Safari/537.85.15
WebView:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.78.2 (KHTML, like Gecko)
@salomvary
salomvary / .ctags
Last active August 29, 2015 14:27
Ruby for VIM
-R
--languages=ruby
--exclude=.git
--exclude=log
@salomvary
salomvary / leaflet-polyline.markdown
Last active September 15, 2015 21:08
Evaluating Leaflet PolyLine Drawing Plugins

Evaluating Leaflet PolyLine Drawing Plugins

Criteria

  • Small footprint
  • Decent code
  • Active development
  • Touch support
  • Drawing a new line
  • Editing mid-points of an existing line
  • Continuing an existing line