Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OddBloke
OddBloke / README.md
Last active January 6, 2017 13:26 — forked from smoser/README.md
publishing image to azure

Publishing an image on Azure

Installation of azure cli tools

The azure cli tool is used to do this publication. To install it follow below. For further questions see Azure CLI Install

# add ~/bin and add it to path
mkdir -p ~/bin/
[ "${PATH#*$HOME/bin}" = "$PATH" ] || PATH=$HOME/bin:$PATH

install npm

class Foo(object):
def __init__(self):
self._endpoint = None
@property
def endpoint(self):
if self._endpoint is None:
self._endpoint = self._find_endpoint()
return self._endpoint
class MyTestCase(unittest.TestCase):
def setUp(self):
self.foo_patcher = patch('__main__.Class', spec=True)
self.foo_patcher.start()
def tearDown(self):
self.foo_patcher.stop()
class TestThingie(MyTestCase):

Features of uvp-monitor:

  • Collects information about resource usage of every VM and periodically writes the information into domain0 through xenstore. The resource usage information includes the total number of CPUs. CPU usage, memory capacity, memory usage, disk capacity, disk usage, and the number of packets received or sent by a NIC.
  • Collects VM hostnames and writes them into domain0 through xenstore.
  • Notifies domain0 whether the current VM supports hot-plug of memory, CPUs, and disks.
  • Facilitates live migration of Xen VMs and triggers VMs to send gARP and ndp packets to the network at completion of live migration.
  • Facilitates self-upgrade of UVP Tools on VMs. The uvp-monitor works with xenstore to notify domain0 of the UVP Tools version installed on VMs. If the UVP Tools version on a VM is different from the UVP Tools version on the host, the UVP Tools on the VM is then automatically upgraded to the version installed on the host.
#!/usr/bin/env python2
import json
import os
import re
import scrapy
from scrapy.crawler import CrawlerProcess
RELEASE_MAP = {
f = open(...)
try:
json.loads(f.read())
except ValueError:
print "Invalid JSON"
raise
finally:
f.close()

Keybase proof

I hereby claim:

  • I am OddBloke on github.
  • I am odd_bloke (https://keybase.io/odd_bloke) on keybase.
  • I have a public key whose fingerprint is 4ADD 4744 1A66 23E7 291B F2B9 EEE6 8776 EDB1 3EA0

To claim this, I am signing this object:

@OddBloke
OddBloke / reproduce.sh
Last active August 29, 2015 14:17
CVE-2015-2296 Reproduction
#!/bin/bash
set -m
cleanup () {
jobs -p | xargs kill -INT
}
python source.py &
python target.py &
### Keybase proof
I hereby claim:
* I am OddBloke on github.
* I am odd_bloke (https://keybase.io/odd_bloke) on keybase.
* I have a public key whose fingerprint is 5848 D31C A3C4 2D64 609F 49EB DDAA DAB0 E8A4 14F6
To claim this, I am signing this object: