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
# Source accepts the protocol s3:// with the host as the bucket | |
# access_key_id and secret_access_key are just that | |
s3_file "/var/bulk/the_file.tar.gz" do | |
source "s3://your.bucket/the_file.tar.gz" | |
access_key_id your_key | |
secret_access_key your_secret | |
owner "root" | |
group "root" | |
mode 0644 | |
end |
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 | |
function getpublickey() | |
{ | |
x=$(curl -fs http://169.254.169.254/latest/meta-data/public-keys/) | |
if [ $? -eq 0 ]; then | |
for i in $x; do | |
index=$(echo $i|cut -d = -f 1) | |
format=$(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/) | |
echo $(curl -s http://169.254.169.254/latest/meta-data/public-keys/$index/$format) |
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
### Monitor Memory and Disk utilization with CloudWatch | |
### Assume that the instance have a IAMRole with CloudWath PutMetricData | |
### http://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/mon-scripts-perl.html | |
%w{ unzip libwww-perl libcrypt-ssleay-perl }.each do |pkg| | |
package pkg do | |
action :install | |
end | |
end |
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
# | |
# Author:: Christopher Peplin (<[email protected]>) | |
# Copyright:: Copyright (c) 2010 Bueda, Inc. | |
# License:: Apache License, Version 2.0 | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.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
#! /usr/bin/ruby | |
require 'google/apis/sheets_v4' | |
require 'googleauth' | |
require 'googleauth/stores/file_token_store' | |
require 'fileutils' | |
OOB_URI = 'urn:ietf:wg:oauth:2.0:oob' | |
APPLICATION_NAME = 'Google Sheets API Test' |
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
To rename WSL Distros on Windows follow the steps: | |
1. Stop all instances of WSL | |
On PowerShell run the command: wsl --shutdown | |
2. Open Registry Editor and go to HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss | |
Each subfolder on Lxss represents a distro | |
3. Locate and rename the distro you want | |
Inside each distro folder you have the DistributionName, change it and click ok |