Getting started
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
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:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==== | |
Sphinx Grok | |
==== | |
Examples of Sphinx projects from official sphinx-doc documentation: | |
https://www.sphinx-doc.org/en/master/examples.html | |
---- | |
Why Use Sphinx |
From: https://blog.sucuri.net/2015/08/ask-sucuri-how-did-my-wordpress-website-get-hacked-a-tutorial.html
Useful for identifying attacker IP and what was done.
# Exclude access log lines for files with these extensions
- 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
towebserver1:9000
.
- setting up apache to serve php application to php-fpm endpoint at
- currently tracking performance improvements, but am optimistic.