This file contains 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
use std::env; | |
use std::net::TcpStream; | |
use std::thread; | |
use std::time::Duration; | |
const SLEEP_SECONDS: u64 = 604800; | |
fn start_connections(conns: i32, addr: &str, start_port: u16, end_port: u16) -> thread::JoinHandle<()> { | |
let addr = String::from(addr); |
This file contains 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 | |
import argparse | |
import glob | |
import os | |
def headervalue(l): | |
parts = l.split(": ", 1) | |
key = parts[0] |
This file contains 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 | |
set -e | |
P12CERT=$1 | |
CERTNAME=${P12CERT%.p12} | |
openssl pkcs12 -in "$P12CERT" -nocerts -nodes -out "${CERTNAME}.key.pem" | |
openssl pkcs12 -in "$P12CERT" -clcerts -nokeys -out "${CERTNAME}.crt.pem" |
This file contains 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 | |
set -e | |
curl -L 'https://storage.googleapis.com/golang/go1.7.4.linux-amd64.tar.gz' | tar -xz -C /usr/local | |
cat > /etc/profile.d/go.sh <<'FOO' | |
export GOPATH=~/go | |
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin | |
FOO |
This file contains 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
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"flag" | |
"log" | |
"os" | |
"strings" |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"os" | |
) | |
type ProductPriceData struct { |
This file contains 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 | |
set -e | |
TMP=$(mktemp -d) | |
cd "$TMP" | |
ssh-keygen -f rsa -t rsa -q -N "" -C "rsa" | |
ssh-keygen -f dsa -t dsa -q -N "" -C "dsa" |
This file contains 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 boto import ec2 | |
from boto.ec2 import elb | |
c = ec2.connect_to_region("us-east-1") | |
elb_c = elb.connect_to_region("us-east-1") | |
all_sgs = set() | |
in_use = set() |
This file contains 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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"regexp" | |
) |
This file contains 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
Name: nodejs-unstable | |
Version: 0.11.13 | |
Release: 1%{?dist} | |
Summary: node.js unstable branch | |
Group: Development/Languages | |
License: MIT and ASL 2.0 and ISC and BSD | |
URL: http://nodejs.org/ | |
Source0: http://nodejs.org/dist/v%{version}/node-v%{version}-linux-x64.tar.gz | |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) |