Skip to content

Instantly share code, notes, and snippets.

Márton Salomváry salomvary

Block or report user

Report or block salomvary

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@salomvary
salomvary / curl-header.sh
Last active Sep 22, 2015
curl to print out the value of a given header
View curl-header.sh
$ curl -sI 'http://google.com' | tr -d '\r' | awk 'BEGIN {FS=": "}/^Location/{print $2}'
http://www.google.de/?gfe_rd=cr&ei=JDsBVrqxNs7j8wfo_5OICw
@salomvary
salomvary / leaflet-polyline.markdown
Last active Sep 15, 2015
Evaluating Leaflet PolyLine Drawing Plugins
View leaflet-polyline.markdown

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
@salomvary
salomvary / .ctags
Last active Aug 29, 2015
Ruby for VIM
View .ctags
-R
--languages=ruby
--exclude=.git
--exclude=log
View untitled.html
<!doctype html>
<html>
<head>
<title>Untitled</title>
</head>
<body>
</body>
</html>
@salomvary
salomvary / datetime.java
Last active Feb 10, 2020
Java 8 Date and Time Parsing and Formatting Microtutorial
View datetime.java
import java.time.format.DateTimeFormatter;
import java.time.Instant;
import java.time.ZonedDateTime;
import java.time.ZoneId;
import java.time.ZoneOffset;
Instant.now();
// java.time.Instant = 2015-08-13T09:28:27.141Z
DateTimeFormatter.ISO_INSTANT.format(Instant.now());
@salomvary
salomvary / PlayJson.scala
Last active Jul 9, 2017
PlayJson Crash Course
View PlayJson.scala
import java.time.{Instant, ZonedDateTime}
import play.api.libs.json._
import scala.util.control.NonFatal
/**
* PlayJson Basics
*/
// See type hierarchy (^H) of:
@salomvary
salomvary / gist:53da16e4ab13c4c34f53
Created May 15, 2015
Safari vs. WebView UserAgent
View gist:53da16e4ab13c4c34f53
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)
View gist:cd6ee9b283a04c4b787c
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 / add-all.sh
Created Dec 16, 2014
Add all jvms to jenv on Mac
View add-all.sh
#!/bin/bash
/usr/libexec/java_home -V 2>&1 1>/dev/null |
tail -n +2 |
awk -F $'\t' '{ print $3 }' |
xargs -n 1 jenv add
You can’t perform that action at this time.