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 | |
IAM_INFO=$(GET http://169.254.169.254/latest/meta-data/iam/info) | |
IAM_INSTANCE_PROFILE=$(echo "${IAM_INFO}" | sed -n 's_^[^/]*/\([^"]*\)".*_\1_p') | |
IAM_CREDENTIALS_URL="http://169.254.169.254/latest/meta-data/iam/security-credentials/$IAM_INSTANCE_PROFILE" | |
IAM_CREDENTIALS=$(GET $IAM_CREDENTIALS_URL) | |
export AWS_ACCESS_KEY=$(echo "${IAM_CREDENTIALS}" | sed -n 's_.*"AccessKeyId" : "\([^"]*\)".*_\1_p') | |
export AWS_SECRET_KEY=$(echo "${IAM_CREDENTIALS}" | sed -n 's_.*"SecretAccessKey" : "\([^"]*\)".*_\1_p') | |
export AWS_DELEGATION_TOKEN=$(echo "${IAM_CREDENTIALS}" | sed -n 's_.*"Token" : "\([^"]*\)".*_\1_p') |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Asyncfun | |
{ | |
public static class AsyncExtensions | |
{ |
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/lib/env ruby | |
# Acquires a shared lock on a SQLite database file and copies it to a backup | |
# usage: backup-db.rb DBFILE.db BACKUPFILE.db | |
# author: William Benton (willb@redhat.com) | |
# Public domain. | |
require 'sqlite3' | |
require 'fileutils' |
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
## Prepare ################################################################### | |
# Remove RVM | |
rvm implode | |
# Ensure your homebrew is working properly and up to date | |
brew doctor | |
brew update | |
## Install ################################################################### |
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
//= require_directory . | |
dojo.require('dojox.rails'); |
NewerOlder