Skip to content

Instantly share code, notes, and snippets.

Avatar

Konrad Rotkiewicz krotkiewicz

View GitHub Profile
View md.md
  • a task list item
  • list syntax required
  • normal formatting, @mentions, #1234 refs
  • incomplete
  • completed
View py.py
class upper_unicode(unicode):
def __new__(cls, param, *args, **kwargs):
param = param.upper()
return unicode.__new__(cls, param, *args, **kwargs)
View replication.py
#!/usr/bin/env python
# encoding: utf-8
"""
replication.py - extport data to external systems
Created by Maximillian Dornseif on 2011-05-01.
Copyright (c) 2011 HUDORA. All rights reserved.
"""
from __future__ import with_statement
View py.py
s = 5
def abc():
abc = s
aaa = [s for s in [1,2,3]]
abc()
View gist:5998379

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
View gist:ca9d86fd94c862c1e40236a824d67f63
Workflow Deployment:
1. User deploys with version1
2. Dash generates deploy_id1 and send it to builder to build image, builder reponds with success
3. Dash stores deploy_id1 and version1 for that project
4. Dash returns version1 to user
Workflow Scheduling via Dash:
1. User sends request to dash to schedule spider1
2. Dash sends request to JobQ with version1 and deploy_id1, JobQ responds with success and creates job1 with version1 and deploy_id1
3. When job1 should be run, JobQ sends request to Kumo Scheduler with deploy_id1 and version1
View 1.sh
$ doctl compute droplet create node --region fra1 --size 2gb --image ubuntu-16-04-x64 --enable-private-networking --ssh-keys 79:29:54:77:13:2f:9c:b8:06:3e:8b:fe:8d:c0:d7:ba
$ doctl compute droplet list (env: st)
ID Name Public IPv4 Private IPv4 Public IPv6 Memory VCPUs Disk Region Image Status Tags
63370004 node1 46.101.177.76 10.135.53.41 2048 2 40 fra1 Ubuntu 16.04.3 x64 active
$ ssh root@46.101.177.76
View 4.sh
root@node:~$ kubelet --pod-manifest-path /tmp/manifests &> /tmp/kubelet.log &
View 5.sh
root@node:~$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c3369c72ebb2 nginx@sha256:aa1c5b5f864508ef5ad472c45c8d3b6ba34e5c0fb34aaea24acf4b0cee33187e "nginx -g 'daemon off" 3 minutes ago Up 3 minutes k8s_nginx_nginx-node_default_594710e736bc86ef2c87ea5615da08b1_0
b603d65d8bfd gcr.io/google_containers/pause-amd64:3.0 "/pause" 3 minutes ago Up 3 minutes k8s_POD_nginx-node_default_594710e736bc86ef2c87ea5615da08b1_0
root@node:~$ docker inspect b603d65d8bfd | jq .[0].NetworkSettings.IPAddress
"172.17.0.2"
root@node:~$ curl 172.17.0.2
<!DOCTYPE html>
<html>
You can’t perform that action at this time.