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/sh | |
echo "Stopping firewall and allowing everyone..." | |
iptables -F | |
iptables -X | |
iptables -t nat -F | |
iptables -t nat -X | |
iptables -t mangle -F | |
iptables -t mangle -X | |
iptables -P INPUT ACCEPT | |
iptables -P FORWARD ACCEPT |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.hostname = "ops1.vtest.tfoundry.com" | |
config.vm.box = "cloud-host" | |
config.ssh.username = 'root' |
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
#!/usr/bin/env bash | |
# | |
# Copyright 2011, AT&T Services, Inc. | |
# | |
# All rights reserved - Do Not Redistribute | |
# | |
# Next we have to fix udev. Since all of our hardware is the same, we can do it this way to make sure all deviceds are always the same | |
cat <<EOF >/etc/udev/rules.d/70-persistent-net.rules | |
# This file was generated by cede. |
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 | |
SESSION=openstack | |
function create_session() { | |
# Create a new session named 'openstack' | |
tmux -2 new-session -d -s $SESSION | |
} | |
function nova_logs() { |
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
#include <iostream> | |
#include <future> | |
#include <thread> | |
#include <algorithm> | |
#include <cstdlib> | |
#include <sstream> | |
#include <mutex> | |
#include <map> | |
#include <string> |
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
The referenced line of code is inside the async in example.cpp here: | |
m.lock(); | |
std::cout << "Starting new thread: " << std::this_thread::get_id() << std::endl; | |
std::cout << "Path: " << entry.path() << std::endl; // example.cpp:37 | |
m.unlock(); | |
---------------- | |
==30211== Thread 4: | |
==30211== Invalid read of size 1 |
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
var http = require("http"); | |
var url = require('url'); | |
var queryString = require('querystring') | |
var API_KEY = "THE_API_KEY"; | |
var FEED = "THE_FEED_ID"; | |
var STREAM = "THE_STREAM_NAME"; | |
var NUM_ATTENDEES = 0 |
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
def stream_handler(sock, address): | |
""" | |
The first 8 bytes, 64 bits, should be the size of the transfer in network | |
byte order. Transfer size type is unsigned 64 bit integer. | |
Total transfer size T ends up being T + 8. | |
""" | |
import math | |
data = '' | |
# TODO: allow read size to be configured in settings. |
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
def read_bytes(length): | |
with open('/dev/urandom') as data: | |
data = os.read(data.fileno(), length) | |
return data | |
def send(conn, data): | |
sent = 0 | |
while sent < len(data): | |
SEMAPHORE.acquire() | |
sent += conn.send(data[sent:]) |
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
#!/usr/bin/env python | |
""" | |
You must have nmap installed with the ssl-heartbleed script and its | |
dependencies (tls.lua) in the current directory. | |
You also need xsltproc for html output. | |
The first argument should be a file containing a list of ips, one ip per line, | |
no blank lines. |