Skip to content

Instantly share code, notes, and snippets.

Avatar

Márton Salomváry salomvary

View GitHub Profile
View electron-hello-world-main.js
const {app, BrowserWindow} = require('electron')
app.on('ready', () => {
const win = new BrowserWindow()
win.loadURL('file://some/local/file.html')
// or
win.loadURL('http://example.com')
})
@salomvary
salomvary / gb-vs-uk.markdown
Last active Jan 21, 2019
TL;DR: GB vs. UK
View gb-vs-uk.markdown

Great Britain, United Kingdom and other related stuff

Great Britain

  • Great Britain is an island in Europe.
  • Great Britain refers geographically to the island of Great Britain, politically to England, Scotland and Wales in combination.

United Kingdom

  • The United Kingdom of Great Britain and Northern Ireland, commonly known as the United Kingdom (UK) or Britain, is a sovereign state in Europe [...]
@salomvary
salomvary / bootstrap-gh-pages.sh
Created Feb 24, 2016
Bootstrapping custom GitHub pages
View bootstrap-gh-pages.sh
git checkout --orphan gh-pages
git rm -rf .
git show master:README.md > README.md
cat > index.html <<END
---
---
<!doctype html>
<body>
{% capture readme %}{% include_relative README.md %}{% endcapture %}
{{ readme | markdownify }}
@salomvary
salomvary / .ctags
Last active Jul 11, 2016
ctags for Ruby and Scala
View .ctags
-R
--languages=ruby
--exclude=.git
View PageLinks.java
@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 Jan 11, 2021
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());