Skip to content

Instantly share code, notes, and snippets.

View tx44's full-sized avatar

tx44 tx44

  • Yerevan, Armenia
  • 15:50 (UTC +04:00)
  • LinkedIn in/teriaev
View GitHub Profile
C4Component
  title Structural diagram for components used on Products page

  Container_Boundary(appComponents, "App components") {
    Container_Boundary(appOrganisms, "App Organisms") {
      Component(ProductsTable, "ProductsTable")
      Component(ProductNewPopup, "ProductNewPopup")
    }
    Container_Boundary(appPages, "App Pages") {
sequenceDiagram
  participant browser as Browser
  participant node as Node.js server
  participant react as React app
  participant lb as Load balancer
  participant iam as IAM (Auth server)
  participant products as Products API
  participant units as Units API
@tx44
tx44 / webcrypto-examples.md
Created September 11, 2022 18:19 — forked from pedrouid/webcrypto-examples.md
Web Cryptography API Examples
@tx44
tx44 / country-bounding-boxes.py
Created June 3, 2022 17:39 — forked from graydon/country-bounding-boxes.py
country bounding boxes
# extracted from http//www.naturalearthdata.com/download/110m/cultural/ne_110m_admin_0_countries.zip
# under public domain terms
country_bounding_boxes = {
'AF': ('Afghanistan', (60.5284298033, 29.318572496, 75.1580277851, 38.4862816432)),
'AO': ('Angola', (11.6400960629, -17.9306364885, 24.0799052263, -4.43802336998)),
'AL': ('Albania', (19.3044861183, 39.624997667, 21.0200403175, 42.6882473822)),
'AE': ('United Arab Emirates', (51.5795186705, 22.4969475367, 56.3968473651, 26.055464179)),
'AR': ('Argentina', (-73.4154357571, -55.25, -53.628348965, -21.8323104794)),
'AM': ('Armenia', (43.5827458026, 38.7412014837, 46.5057198423, 41.2481285671)),
@tx44
tx44 / letsencrypt_2017.md
Created May 4, 2018 19:21 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)

There are two main modes to run the Let's Encrypt client (called Certbot):

  • Standalone: replaces the webserver to respond to ACME challenges
  • Webroot: needs your webserver to serve challenges from a known folder.

Webroot is better because it doesn't need to replace Nginx (to bind to port 80).

In the following, we're setting up mydomain.com. HTML is served from /var/www/mydomain, and challenges are served from /var/www/letsencrypt.

@tx44
tx44 / sauce-connect.sh
Last active July 2, 2017 10:44 — forked from sarahhodne/sauce-connect.sh
Run Sauce Connect on Travis CI
#!/bin/bash
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then
echo "This script can't run without your Sauce credentials"
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables"
echo "export SAUCE_USERNAME=ur-username"
echo "export SAUCE_ACCESS_KEY=ur-access-key"
exit 1
fi
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)"