Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey lanceon

View GitHub Profile
@lanceon
lanceon / README.md
Created May 26, 2020 — forked from zoilomora/README.md
How to disable systemd-resolved in Ubuntu
View README.md

How to disable systemd-resolved in Ubuntu

Stages

  • Disable and stop the systemd-resolved service:

      sudo systemctl disable systemd-resolved.service
      sudo systemctl stop systemd-resolved
    
  • Then put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

View README.md

To achieve this you can setup DNS Proxy Mode using the host's resolver with the following command: VBoxManage modifyvm "VM name" --natdnshostresolver1 on

As the result, guest OS DNS requests will be intercepted and resolved using host DNS API, rather than having guest OS connect to external DNS servers as with --netdnsproxy1 on.

You can get the name of the VM by running VBoxManage list runningvms.

@lanceon
lanceon / nginx-tls.conf
Created Aug 11, 2018 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
View nginx-tls.conf
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are omitted here.
#
# Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io
#
@lanceon
lanceon / http-benchmark.md
Created Mar 28, 2018 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
View http-benchmark.md
@lanceon
lanceon / TestMultipartFileUpload.scala
Created Feb 9, 2018 — forked from jrudolph/TestMultipartFileUpload.scala
akka-http Multipart file-upload client + server example
View TestMultipartFileUpload.scala
package akka.http.scaladsl
import java.io.File
import akka.http.scaladsl.unmarshalling.Unmarshal
import akka.util.ByteString
import scala.concurrent.duration._
import akka.actor.ActorSystem
View git-tag-delete-local-and-remote.sh
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@lanceon
lanceon / js-error-logging-services.md
Created Nov 10, 2017 — forked from cheeaun/js-error-logging-services.md
JavaScript error logging services
View js-error-logging-services.md
@lanceon
lanceon / Event-stream based GraphQL subscriptions.md
Created Nov 8, 2017 — forked from OlegIlyenko/Event-stream based GraphQL subscriptions.md
Event-stream based GraphQL subscriptions for real-time updates
View Event-stream based GraphQL subscriptions.md

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@lanceon
lanceon / curl.md
Created Aug 25, 2017 — forked from subfuzion/curl.md
curl POST examples
View curl.md

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

You can’t perform that action at this time.