Skip to content

Instantly share code, notes, and snippets.

<html>
<head>
</head>
<body>
<video width="960" height="540" controls>
<source src="" type="video/mp4">
</video>
<script type="application/javascript">
with running_queries as (
select
pid,
datname as database_name,
(case when state='active' then now() else state_change end) - query_start as run_time,
backend_start,
xact_start,
query_start,
state_change,
wait_event_type,
"registry-mirrors": [
"http://saturn.lan.whitehorn.us:5000"
]
docker pull registry
docker run -d -p 5000:5000 \
--restart always \
-e REGISTRY_PROXY_REMOTEURL='https://registry-1.docker.io' \
-v /mnt/simple-storage/registry:/var/lib/registry \
--name registry registry
We couldn’t find that file to show.
~> python --help
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Options and arguments (and corresponding environment variables):
...
-u : force the binary I/O layers of stdout and stderr to be unbuffered;
stdin is always buffered; text I/O layer will be line-buffered;
also PYTHONUNBUFFERED=x
FROM python:3.7.4
RUN mkdir -p /var/app
WORKDIR /var/app
COPY . ./
CMD python -u app.py
FROM python:3.7.4
RUN mkdir -p /var/app
WORKDIR /var/app
COPY . ./
CMD python app.py
@jwhitehorn
jwhitehorn / app.py
Last active November 30, 2019 21:44
import time
print("App running!")
while True:
time.sleep(5)
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
[request setHTTPMethod:@"GET"];
NSString *url = @"http://localhost:5000/api/updates/";
if(checksum){
url = [NSString stringWithFormat:@"%@?checksum=%@", url, checksum];
}
[request setURL:[NSURL URLWithString:url]];
[[[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *err) {
NSInteger statusCode = [(NSHTTPURLResponse *)response statusCode];