Skip to content

Instantly share code, notes, and snippets.

Avatar

Márton Salomváry salomvary

View GitHub Profile
@salomvary
salomvary / dotroll-kft-incidens.md
Last active Feb 15, 2021
Incidens bejelentés - DotRoll Kft. 2021.02.15
View dotroll-kft-incidens.md

Tisztelt Ügyfelünk!

Ezúton értesítjük, hogy a jelek szerint behatolás történt szervereink belső hálózatába. A behatolás során a támadónak lehetősége volt hozzáférni a szervereinken tárolt adatokhoz. Egyértelmű nyomokat nem találtunk arra vonatkozóan, hogy adatot tulajdonítottak volna el, azonban ezt sajnos kizárni sem tudjuk.

Ezért többek között a következő intézkedéseket végeztük el:

  • Az összes admin felhasználónk jelszavát megváltoztattuk és belépéshez kötelezővé tettük a két lépcsős authentikációt.
  • Az összes szerverünk SSH belépési jelszavait és kulcsait megváltoztattuk.
  • Felülvizsgáltuk az összes szerverünk tűzfalának beállításait.
  • Bejelentettük a Nemzeti Adatvédelmi és Információszabadság Hatóság felé az incidenst (NAIH).
  • A com/net/org/eu domain nevek eddigi authentikációs kódjai helyett újakat generáltunk.
View labelled-statements-use-case.js
// Works fine but what does `break` break and `continue` continue?
for (x of y) {
switch (x) {
case '':
if (condition)
continue
else
break
}
// Do more stuff
@salomvary
salomvary / 20 Ways of Writing React Components.tsx
Last active Oct 17, 2020
20 Ways of Writing React Components
View 20 Ways of Writing React Components.tsx
import React, { createElement, Component, FC, Fragment, FunctionComponent, ReactNode } from 'react';
import createReactClass from 'create-react-class';
const C = () => <></>;
const C: FC = () => <></>;
const C: () => ReactNode = () => <></>;
const C: FunctionComponent = () => <></>;
const C = (props) => <>{props.p}</>;
const C: (props: {p: string}) => ReactNode = (props) => <>{props.p}</>;
const C = (props: {p: string}) => <>{props.p}</>;
@salomvary
salomvary / README.md
Last active Nov 19, 2020
Electron Entitlements for Mac App Store
View README.md

These are the entitlements files I managed to build an Electron app for Mac App Store distribution.

Tested with Electron 8 on macOS Catalina and Mojave.

Used latest electron-builder for packaging (see package.json for configuration). Should work with other packaging tools but hardened runtime must be turned off.

View awscreds-lpass.sh
#!/bin/sh
# Usage:
#
# - Install jq: https://stedolan.github.io/jq/
# - Add this script to your path, eg. to /usr/local/bin
# - Add AWS access key id and secret access key to LastPass
# named "AWS Credentials for my-profile profile"
# - Add "credential_process = awscreds-lpass my-profile" to
# the respective profile in ~/.aws/config
View Is Gmail slow in Firefox.markdown

Is Gmail slow in Firefox?

I recently ranted about Gmail being slow in Firefox and decided to investigate and support my claim with numbers.

Here is a video illustrating the perceived speed (I could not capture how slow this sometimes actually gets but still looks slow): https://www.youtube.com/watch?v=yu3KMki-9_w

My perceived annoying slowness looks like this:

  • Open a new Firefox tab with gmail.com
View QueryBuilderTest.java
import com.datastax.driver.core.querybuilder.Select;
import org.junit.Test;
import static com.datastax.driver.core.querybuilder.QueryBuilder.eq;
import static com.datastax.driver.core.querybuilder.QueryBuilder.select;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
public class QueryBuilderTest {
@salomvary
salomvary / example.scala
Created Dec 19, 2017
Parallel Composition of Scala Futures
View example.scala
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
case class Author(id: Long, name: String)
case class Publication(id: Long, authorId: Long, title:String)
case class AuthorPublications(author: Author, publications: List[Publication])
def findAuthor(query: String): Future[Long] = ???
@salomvary
salomvary / continuous.md
Last active Oct 4, 2017
Continuous delivery vs integration vs. deployment
View continuous.md

"Continuous delivery (CD) is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time."

"In software engineering, continuous integration (CI) is the practice of merging all developer working copies to a shared mainline several times a day."

"Continuous deployment means that every change is automatically deployed to production. Continuous delivery means that the team ensures every change can be deployed to production but may choose not to do it, usually due to business reasons. In order to do continuous deployment one must be doing continuous delivery."