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
#!/bin/bash | |
# create memory limited cgroup | |
sudo cgcreate -g memory:firefox | |
echo "5G" | sudo tee -a /sys/fs/cgroup/memory/firefox/memory.limit_in_bytes | |
echo "1" | sudo tee -a /sys/fs/cgroup/memory/firefox/memory.swappiness | |
# move shell to cgroup | |
echo $$ | sudo tee /sys/fs/cgroup/memory/firefox/tasks | |
# start firefox |
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
import json | |
from connexion.apis.abstract import Specification | |
spec = Specification.from_spec("swagger.yml") | |
json.dumps(spec.raw) |
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
Error: | |
description: schema for problem+json (RFC 7807) | |
type: object | |
required: | |
- type | |
properties: | |
type: | |
description: A URI reference [RFC3986] that identifies the problem type. | |
type: string | |
format: uri |
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
openapi: 3.0.0 | |
#servers: [] # this breaks swagger-ui | |
info: | |
title: Pet Shop Example API | |
version: '0.1' | |
paths: | |
/pets: | |
get: | |
tags: | |
- Pets |
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
openapi: 3.0.0 | |
servers: [] # this breaks swagger-ui | |
info: | |
title: Pet Shop Example API | |
version: '0.1' | |
paths: | |
/pets: | |
get: | |
tags: | |
- Pets |
I hereby claim:
- I am dtkav on github.
- I am dtkav (https://keybase.io/dtkav) on keybase.
- I have a public key ASC8OLoL69bvPb7ZaW_dRwzOIJacND4cQaRd3hHA3_E7vwo
To claim this, I am signing this object:
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 __future__ import print_function | |
import urllib | |
import urllib2 | |
import json | |
PLANET_URL = "http://ephemerides.planet-labs.com/planet_mc.tle" | |
def lambda_handler(event, context): | |
cb = event["params"]["querystring"].get("callback", "tle_data") |
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
Verifying that +dtkav is my blockchain ID. https://onename.com/dtkav |
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
function dug() { | |
ls -d */ >/dev/null 2>&1; | |
if [[ $? -eq 0 && `ls -d */ | wc -l` -eq 1 ]]; | |
then | |
builtin cd `ls -d */`; | |
dig; | |
fi | |
} |
NewerOlder