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 | |
''' | |
Send memory usage metrics to Amazon CloudWatch | |
This is intended to run on an Amazon EC2 instance and requires an IAM | |
role allowing to write CloudWatch metrics. Alternatively, you can create | |
a boto credentials file and rely on it instead. | |
Original idea based on https://github.com/colinbjohnson/aws-missing-tools | |
''' |
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 os | |
import os.path | |
import re | |
import time | |
import json | |
# script to create an ssh tunnel from a public server back to a private (firewalled/NATted) machine; a poor man's VPN, basically | |
# how it works: | |
# private machine run this script at regular intervals, which attempts to ssh into public server; if successful, it |
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
aptitude install -y build-essential | |
wget "http://downloads.sourceforge.net/project/e1000/ixgbevf stable/2.11.3/ixgbevf-2.11.3.tar.gz" | |
tar -zxf ./ixgbevf-* | |
cd ixgbevf*/src | |
make install | |
modprobe ixgbevf | |
sudo update-initramfs -c -k all | |
echo "options ixgbevf InterruptThrottleRate=1,1,1,1,1,1,1,1" > /etc/modprobe.d/ixgbevf.conf |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> |
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
cat > client.json <<'EOF' | |
{ | |
"client": { | |
"name": "sensu-server.dom.tld", | |
"address": "10.0.0.1", | |
"subscriptions": [ "test" ] | |
} | |
} | |
EOF |
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 time | |
import socket | |
import base64 | |
src = '192.168.1.2' # ip of remote | |
mac = '00-AB-11-11-11-11' # mac of remote | |
remote = 'python remote' # remote name | |
dst = '192.168.1.3' # ip of tv | |
app = 'python' # iphone..iapp.samsung |
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 LVM for partitioning | |
d-i partman-auto/method string lvm | |
# If one of the disks that are going to be automatically partitioned | |
# contains an old LVM configuration, the user will normally receive a | |
# warning. Preseed this away | |
d-i partman-lvm/device_remove_lvm boolean true | |
# And the same goes for the confirmation to write the lvm partitions. | |
d-i partman-lvm/confirm boolean true |
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 | |
echo ' _ __ _______ __ __ _ _____ _ ' | |
echo '| | \ \ / / ____| \ \ / / | | | __ \ | |' | |
echo '| | \ V / | \ \ /\ / /__| |__ | |__) |_ _ _ __ ___| |' | |
echo "| | > <| | \ \/ \/ / _ \ '_ \ | ___/ _\` | '_ \ / _ \ |" | |
echo '| |____ / . \ |____ \ /\ / __/ |_) | | | | (_| | | | | __/ |' | |
echo '|______/_/ \_\_____| \/ \/ \___|_.__/ |_| \__,_|_| |_|\___|_|' | |
echo -e '\n\nAutomatic installer\n' | |
if [[ "$UID" -ne "0" ]];then |
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/ruby | |
require 'socket' | |
# AWS API Credentials | |
AWS_ACCESS_KEY_ID = "your-aws-access-key-id" | |
AWS_SECRET_ACCESS_KEY = "your-aws-secret-access-key" | |
# Node details | |
NODE_NAME = "webserver-01.example.com" |
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
<% unless @chef_requires.empty? %> | |
<%= @chef_requires.inspect %>.each do |lib| | |
begin | |
require lib | |
rescue LoadError | |
Chef::Log.warn "Failed to load #{lib}. This should be resolved after a chef run." | |
end | |
end | |
<% end %> |
OlderNewer