Skip to content

Instantly share code, notes, and snippets.

View zeddee's full-sized avatar

Zed zeddee

View GitHub Profile
# from https://course.spacy.io/chapter1
from spacy.lang.en import English
nlp = English()
doc = nlp("hello world!!! one 123")
for token in doc:
print(token.text)
print(doc)
@zeddee
zeddee / azure-grok.rst
Last active March 21, 2020 23:58
added suffix to sectnum directive

Azure Grok

Getting started

@zeddee
zeddee / nytimes-library-test.rst
Last active January 3, 2020 07:47
removed z-iam-roles file for shorter gist

Setting up nytimes/library

This gist is just me trying to make sense of installing and running https://github.com/nytimes/library and figuring out where I've gone wrong.

So far, I've found that at v1.2.0, the library:

The tree <location> command lists the contents of <location> as an ASCII-formatted directory tree.

For example, to:

  • List the contents of the current working directory ($(pwd)),
  • List all hidden files and folders,
  • Exclude the node_modules and .git directories,

Run:

// todo:
// - send 3 "pings" concurrently
// - receive the pings and store them in a slice called "msgbox"
// - print the contents of the "msgbox" -- it should contain 3 "ping" strings
package main
import (
"fmt"
"sync"
)
# there's an ARM-compatible version here: https://github.com/ulm0/gitlab
# datadir and other dirs gleaned from the above repo
docker run -d --rm \
-p 8888:80 \
-p 8443:443 \
-p 8822:22 \
-p 8880:8080 \
-v $(pwd)/config:/etc/gitlab \
-v $(pwd)/log:/var/log/gitlab \
-v $(pwd)/data:/var/opt/gitlab \
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
====
Sphinx Grok
====
Examples of Sphinx projects from official sphinx-doc documentation:
https://www.sphinx-doc.org/en/master/examples.html
----
Why Use Sphinx
  • Killer feature of cPanel/WHM is multi-php.
  • Mainly because multi-php allows you to enable php-fpm with a single UI toggle.
  • Switching on php-fpm is basically zero-config in cPanel — enable it and the web server just starts using php-fpm.
  • (still not sure what goes on under the hood, which is a bit concerning, but i'm taking whatever i can get)
  • For comparison, setting this up without cPanel requires:
    • setting up apache to serve php application to php-fpm endpoint at :9000
    • setting up a reverse proxy that hits the php-fpm endpoint at :9000 and serves the processed content to :80 and :443
    • so we need install and configure: php-fpm, webserver1 that serves the php-fpm endpoint, webserver2 that reverse-proxies requests from :80 and :443 to webserver1:9000.
  • currently tracking performance improvements, but am optimistic.