Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/bin/bash | |
| env x='() { :;}; echo vulnerable' bash -c "echo this is a test" | grep vulnerable > /dev/null 2>&1 | |
| if [ $? -eq 1 ]; then | |
| echo "Not vulnerable. Machine is safe." | |
| exit 0 | |
| else | |
| echo -n "Vulnerable. Version: " | |
| /bin/bash --version | |
| echo "Installing patch." |
| #!/bin/bash | |
| check_node() { | |
| local ID="$1" | |
| local NODE="$2" | |
| UPTIME_LINE="$(ssh -q -oStrictHostKeyChecking=no -oUserKnownHostsFile=/dev/null $NODE uptime < /dev/null)" | |
| if echo "${UPTIME_LINE}" | grep -q 'days'; then | |
| echo "${ID}:${NODE}:OLDERTHANADAY" | |
| return 0 | |
| fi |
| #!/bin/sh | |
| M2DIR=~/.m2 | |
| MAXAGE="864000" # 10 days in sec | |
| NOW="`date +%s`" | |
| MAXOLD="$(($NOW - $MAXAGE))" # files older than this will be removed. See further | |
| # get list or artifact ID's prependede with group | |
| find $M2DIR -iname "*.pom" \ | |
| | xargs dirname | xargs dirname \ # dirname twice gives a directory 1 level up the version | |
| | sort | uniq \ | |
| | while read ARTIFACT; do |
| """ | |
| Settings for root logger. | |
| Log messages will be printed to console and also to log file (rotated, with | |
| specified size). All log messages from used libraries will be also handled. | |
| Three approaches for defining logging settings are used: | |
| 1. using logging classes directly (py25+, py30+) | |
| 2. using fileConfig (py26+, py30+) | |
| 3. using dictConfig (py27+, py32+) | |
| Choose any variant as you like, but keep in mind python versions, that |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| user www-data; | |
| # As a thumb rule: One per CPU. If you are serving a large amount | |
| # of static files, which requires blocking disk reads, you may want | |
| # to increase this from the number of cpu_cores available on your | |
| # system. | |
| # | |
| # The maximum number of connections for Nginx is calculated by: | |
| # max_clients = worker_processes * worker_connections | |
| worker_processes 1; |
| include_recipe "apt" | |
| include_recipe "python" | |
| execute "upgrade packages" do | |
| command "apt-get -y upgrade" | |
| action :nothing | |
| end.run_action(:run) | |
| package 'vim' | |
| package 'python-setuptools' |
| require 'formula' | |
| class Macvim < Formula | |
| homepage 'http://code.google.com/p/macvim/' | |
| url 'https://github.com/b4winckler/macvim/tarball/snapshot-65' | |
| version '7.3-65' | |
| sha1 'fa5f6e0febe1ebcf5320a6ff8bcf4c7e39eccf8e' | |
| head 'https://github.com/b4winckler/macvim.git', :branch => 'master' |