- A computer network is a set of computers sharing resources
- Communications are commonly established using cables or radio waves
- Network nodes are identified by a network address (ex: IP address)
- That can be accompanied by a more memorable hostname
- The Internet is a global system of interconnected computer networks, with:
- Local scopes, with private network addresses (ex: LANs, RFC 1918)
Opening a mp4 video from GridFS leads to excessive memory usage after a few concurrent calls. The video in question is 43276570 bytes in size. I mention video because it was the scenario that caused me to notice the problem initially, however I think it's fair to assume the results will be the same regardless of what content you are loading.
It wasn't hard to spot something was going on since I noticed 100MiB+ of memory was being used after opening the video twice in different browser tabs. To get a feel for the gravity of the issue I ran a siege benchmark with 50 concurrent users.
siege -c 50 -r 1 'http://localhost:8080/'
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nats | |
labels: | |
app: nats | |
spec: | |
selector: | |
app: nats |
unc0ver: ~13.5 https://unc0ver.dev/
checkra1n: ~13 (14 & A10+ experimental) https://checkra.in/
- download checkra
- connect your iPhone via USB
- start JB on checkra
# We accomplish this by passing the req and res objects from the expressjs router to the context option | |
# After getting the specific role or permission from the query instance we can accomplish route validation | |
let graphQLSchema = { | |
...... | |
resolve: async function(root, args, context){ | |
context.role = 'ADMIN' | |
} | |
} |
version: '2' | |
services: | |
# MongoDB: https://hub.docker.com/_/mongo/ | |
mongodb: | |
image: mongo:3 | |
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/5.6/docker.html | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:5.6.3 | |
environment: | |
- http.host=0.0.0.0 |
## recursiveDescription | |
I don't think it necessary to introduce this method again. It prints the hierarchy of an UIView object. Here's how we use it in Cycript: | |
```objc | |
cy# [[UIApp keyWindow] recursiveDescription].toString() | |
`<iConsoleWindow: 0x156b6410; baseClass = UIWindow; frame = (0 0; 320 480); autoresize = W+H; gestureRecognizers = <NSArray: 0x156b6bc0>; layer = <UIWindowLayer: 0x156b6720>> | |
| <UILayoutContainerView: 0x16258d80; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0x16258e00>> | |
| | <UITransitionView: 0x16259610; frame = (0 0; 320 480); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x16259760>> | |
| | | <UIViewControllerWrapperView: 0x16243bb0; frame = (0 0; 320 480); autoresize = W+H; layer = <CALayer: 0x1625a670>> |
This gist is based on the information available at golang/dep, only slightly more terse and annotated with a few notes and links primarily for my own personal benefit. It's public in case this information is helpful to anyone else as well.
I initially advocated Glide for my team and then, more recently, vndr. I've also taken the approach of exerting direct control over what goes into vendor/
in my Dockerfiles, and also work from
isolated GOPATH environments on my system per project to ensure that dependencies are explicitly found under vendor/
.
At the end of the day, vendoring (and committing vendor/
) is about being in control of your dependencies and being able to achieve reproducible builds. While you can achieve this manually, things that are nice to have in a vendoring tool include:
package main | |
import ( | |
"bytes" | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"errors" | |
"io" | |
"io/ioutil" |