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 ubuntu:14.04 | |
MAINTAINER Jeremiah Harmsen <jeremiah@google.com> | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
curl \ | |
git \ | |
libfreetype6-dev \ | |
libpng12-dev \ |
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
SELECT | |
tmp.ipAddress, | |
-- Calculate how many connections are being held by this IP address. | |
COUNT( * ) AS ipAddressCount, | |
-- For each connection, the TIME column represent how many SECONDS it has been in | |
-- its current state. Running some aggregates will give us a fuzzy picture of what | |
-- the connections from this IP address is doing. | |
FLOOR( AVG( tmp.time ) ) AS timeAVG, |
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
/* run \. /tmp/mysql_victims.txt after executing this query */ | |
SELECT | |
concat('KILL ', id, ';') | |
FROM | |
information_schema.processlist | |
WHERE | |
user='victim' AND time > 60 | |
INTO OUTFILE '/tmp/mysql_victims.txt'; |
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 | |
#Don't forget to do a 'chmod + buildAllContainers.sh' | |
# function to open a new terminal tab and run commands (for Apple Terminal or iTerm) | |
open_tab() { | |
[ $# -lt 1 ] && return | |
if [ "$TERM_PROGRAM" == "Apple_Terminal" ] | |
then | |
osascript -e " | |
'tell application \"Terminal\" |
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
# Start from ami-763a311e | |
# Install various packages | |
sudo apt-get update | |
sudo apt-get upgrade -y # choose “install package maintainers version” | |
sudo apt-get install -y build-essential python-pip python-dev git python-numpy swig python-dev default-jdk zip zlib1g-dev | |
# Install Bazel | |
git clone https://github.com/bazelbuild/bazel.git | |
cd bazel |
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
mkdir ~/projects | |
cd ~/projects | |
git clone --recurse-submodules https://github.com/petewarden/tensorflow_ios.git tensorflow_ios | |
cd tensorflow_ios | |
mkdir tools | |
mkdir tools/objc | |
echo ' | |
filegroup( | |
name = "default_provisioning_profile", | |
srcs = ["default_provisioning_profile.mobileprovision"], |
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 this docker-compose.yml file to start services. | |
# https://github.com/johndpope/DockerParseyAPI | |
# https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/docker | |
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/Dockerfile.devel | |
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/Dockerfile.devel-gpu | |
FROM gcr.io/tensorflow/tensorflow:latest-devel |
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
func makeGetCall() { | |
// Set up the URL request | |
let todoEndpoint: String = "https://jsonplaceholder.typicode.com/todos/1" | |
guard let url = URL(string: todoEndpoint) else { | |
print("Error: cannot create URL") | |
return | |
} | |
let urlRequest = URLRequest(url: url) | |
// set up the session |
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
Pull the Docker Image From Docker Hub: | |
docker pull swiftdocker/swift | |
docker run --privileged -i -t --name swiftfun swiftdocker/swift:latest /bin/bash | |
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
import PackageDescription | |
let package = Package( | |
name: "SPMTester", | |
dependencies: [ | |
.Package( | |
url: "../Alamofire", | |
"4.0.2" | |
) | |
] |