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
| %matplotlib inline | |
| from datetime import date, timedelta | |
| RACE_DISTANCE = 200 | |
| CLIMBING_DISTANCE = 4219 | |
| RACE_DATE = date(2014, 7, 26) | |
| RATE = 0.10 | |
| PERCENT_OF_TARGET = .80 | |
| TODAY = date.today() |
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
| [Unit] | |
| Description=Ubuntu Latest | |
| After=etcd.service | |
| After=docker.service | |
| [Service] | |
| ExecStart=/usr/bin/docker run --name ubuntu-latest ubuntu /bin/bash -c "while true; do sleep 60; done" | |
| ExecStop=/usr/bin/docker stop ubuntu-latest | |
| [Install] |
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
| cat<<-EOF > /etc/systemd/system/ | |
| [Unit] | |
| Description=Docker Application Container Engine | |
| Documentation=http://docs.docker.io | |
| [Service] | |
| ExecStartPre=/bin/mount --make-rprivate / | |
| # Run docker but don't have docker automatically restart | |
| # containers. This is a job for systemd and unit files. | |
| ExecStart=/usr/bin/docker -d -s=btrfs -r=false --tlsverify --tlscacert=/var/ssl/ca.pem --tlscert=/var/ssl/server-cert.pem --tlskey=/var/ssl/server-key.pem -H fd:// |
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
| # correct | |
| def func1(num): | |
| x, y = (1, 0) | |
| h = 0.1 | |
| for n in xrange(num): | |
| x_n = x | |
| y_n = y | |
| x = x_n + h | |
| y = y_n + h * (x_n - y_n**2) | |
| yield (x,y) |
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 ubuntu:latest | |
| MAINTAINER James Kyle "[email protected]" | |
| RUN apt-get update -qq && apt-get -y install nginx | |
| RUN echo "daemon off;" >> /etc/nginx/nginx.conf | |
| ADD default /etc/nginx/sites-available/default | |
| EXPOSE 80 |
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
| $ tree | |
| . | |
| ├── distribution | |
| │ ├── distribution.go | |
| │ └── gammavariate.go | |
| ├── flowdist.json | |
| ├── flows | |
| │ └── flow.go | |
| ├── rage | |
| │ └── agent.go |
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
| server { | |
| location /roadrage { | |
| rewrite /roadrage/(.*) /$1 break; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header Host $host; | |
| # I've tried with and without the trailing / | |
| proxy_pass http://cl1.dlstx.met:8888/; | |
| proxy_redirect default; | |
| } |
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
| [Match] | |
| Name=vlan1500 | |
| [Network] | |
| Description=Management Network | |
| Address=10.1.20.15/16 |
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
| [Unit] | |
| Description=Packet Filtering Framework | |
| DefaultDependencies=no | |
| After=systemd-sysctl.service | |
| Before=sysinit.target | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/usr/sbin/iptables-restore /etc/iptables.rules | |
| ExecReload=/usr/sbin/iptables-restore /etc/iptables.rules |
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 | |
| ############################################################################### | |
| # NOTICE: This script is intended to be used in conjunction with a openssl.cnf | |
| # template such as this one: | |
| # https://gist.github.com/jameskyle/8106d4d5c6dfa5395cef | |
| # (C) Copyright 2014 James A. Kyle. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. |