In a terminal start a server.
$ python -m SimpleHTTPServer 8000In another terminal set up the cgroups freezer.
In a terminal start a server.
$ python -m SimpleHTTPServer 8000In another terminal set up the cgroups freezer.
| <?php | |
| // For laravel 5 based systems | |
| // /path/to/project/app/Console/Commands/AllowSSHFromIP.php | |
| namespace App\Console\Commands; | |
| use Aws\Ec2\Ec2Client; | |
| use Carbon\Carbon; | |
| use Illuminate\Console\Command; |
| resource "aws_cloudformation_stack" "autoscaling_group" { | |
| name = "${var.cfn_stack_name}" | |
| template_body = <<EOF | |
| Description: "${var.cfn_stack_description}" | |
| Resources: | |
| ASG: | |
| Type: AWS::AutoScaling::AutoScalingGroup | |
| Properties: | |
| VPCZoneIdentifier: ["${join("\",\"", var.subnets)}"] |
| // Variables | |
| // Color for <code> and <pre> | |
| $lighterGray: lighten(black, 25%); | |
| // Background color for <code> | |
| $lightGray: lighten(lightgray, 10%); | |
| // Border color for <pre> and <code> | |
| $darkGray: darken(lightgray, 3%); | |
| // Background color of YouTube | |
| $darkerGray: darken(gray, 35%); |
| podTemplate(label: 'mypod', | |
| containers: [ | |
| containerTemplate(name: 'docker', image: 'docker', ttyEnabled: true, command: 'cat'), | |
| containerTemplate(name: 'kubectl', image: 'lachlanevenson/k8s-kubectl:v1.9.3',command:'cat', ttyEnabled: true), | |
| containerTemplate(name: 'node', image: 'node:8.10-alpine', command: 'cat', ttyEnabled: true), | |
| containerTemplate(name: 'helm', image: 'lachlanevenson/k8s-helm', ttyEnabled: true, command: 'cat', priviledged: true) | |
| ], | |
| volumes:[ | |
| hostPathVolume(mountPath: '/var/run/docker.sock', hostPath: '/var/run/docker.sock'), | |
| ] |
| #!/bin/sh | |
| sudo apt-get update \ | |
| && sudo apt-get install -qy docker.io | |
| sudo apt-get update \ | |
| && sudo apt-get install -y apt-transport-https \ | |
| && curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - | |
You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)
When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.
Once verified, you'll have to agree to the terms of service; do that, and click continue.
Usage: node strace_log_analyzer.js strace.log /tmp
This scripts parses input file that must contain strace log from a single thread. Then script calculates:
strace log must be collcted with -t -T -f options.
| #!/bin/bash | |
| DOCKER_COMPOSE_FILES='docker-compose1.yml,docker-compose2.yml' | |
| DOCKER_COMPOSE_UP_MODE=1 #1|0 | |
| DOCKER_COMPOSE_UP_LOG_FILE='/tmp/log.txt' | |
| DOCKER_COMPOSE_BUILD_OPTIONS="" #any options for `docker-compose build` | |
| DOCKER_COMPOSE_UP_OPTIONS="" #any options for `docker-compose up` | |
| DOCKER_COMPOSE_RUN_OPTIONS="" #any options for `docker-compose run` | |
| TEST_CONTAINERS="application1=/test.sh,application2=/test2.sh" | |
| ##### get port remover ##### |