This file contains hidden or 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, sys | |
| import site | |
| # Remember original sys.path. | |
| prev_sys_path = list(sys.path) | |
| # we add currently directory to path and change to it | |
| pwd = os.path.dirname(os.path.abspath(__file__)) | |
| os.chdir(pwd) | |
| sys.path = [pwd] + sys.path |
This file contains hidden or 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
| 1021 rberger $ knife cookbook bulk delete '.*' -p -c ~/.chef.production/knife.rb | |
| [ | |
| "activemq", | |
| "apache2", | |
| "apparmor", | |
| "application", | |
| "apt", | |
| "aws", | |
| "boost", | |
| "bootstrap", |
This file contains hidden or 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
| # Configure an Ubuntu precise machine in the cloud with ports 22, 4000, and 4040 first | |
| # Then logon to that machine and run this script | |
| sudo apt-get -y install sudo wget lsb-release | |
| echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list | |
| sudo mkdir -p /etc/apt/trusted.gpg.d | |
| gpg --keyserver keys.gnupg.net --recv-keys 83EF826A | |
| gpg --export [email protected] | sudo tee /etc/apt/trusted.gpg.d/opscode-keyring.gpg > /dev/null |
This file contains hidden or 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
| ➜ myface git:(master) ✗ knife hp server create \ | |
| > -E test \ | |
| > -N vial \ | |
| > -G test \ | |
| > -I 120 \ | |
| > -f 102 \ | |
| > -S hpdefault \ | |
| > -i /Users/nilesh/Downloads/hpdefault.pem \ | |
| > -x ubuntu \ | |
| > -r 'role[base]' |
This file contains hidden or 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
| ;; | |
| ;; Stub makefile to building xforty-drupal | |
| ;; | |
| ;---------------------------------------- | |
| ; base make file | |
| ;---------------------------------------- | |
| ; If you want to use the latest HEAD from 7.x branch | |
| ;includes[] = http://github.com/xforty/xforty-drupal/raw/7.x/xforty-com.make |
This file contains hidden or 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
| api = 2 | |
| core = 7.x | |
| projects[drupal][type] = core | |
| projects[drupal][version] = 7.17 | |
| ; http://drupal.org/node/1371216#comment-5600570 (fixes undefined function for text.install) | |
| projects[drupal][patch][] = http://drupal.org/files/undefined_function_during_install-1371216-3.patch | |
| ; http://drupal.org/node/1330952#comment-5358448 (fixes "Incorrect integer value" errors with fields) | |
| projects[drupal][patch][] = http://drupal.org/files/field_sql_storage_null_string_fix-1330952-2-D7.patch |
This file contains hidden or 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 | |
| #^syntax detection | |
| site 'http://community.opscode.com/api/v1' | |
| cookbook 'apache2' |
This file contains hidden or 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
| name "base" | |
| description "Base role applied to all nodes." | |
| run_list( | |
| "recipe[apache2]" | |
| ) | |
| override_attributes( | |
| :authorization => { | |
| :sudo => { | |
| :users => ["ubuntu"], | |
| :passwordless => true |
This file contains hidden or 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
| ➜ Projects rails new app -d postgresql | |
| create | |
| create README.rdoc | |
| create Rakefile | |
| create config.ru | |
| create .gitignore | |
| create Gemfile | |
| create app | |
| create app/assets/images/rails.png | |
| create app/assets/javascripts/application.js |
This file contains hidden or 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
| # Ruby file to use the Google Prediction API, with a very hacked OAuth2 | |
| # You'll want to replace all the custom variables including.. | |
| # 1. Your google storage bucket name | |
| # 2. Your google storage access credentials (note that gstore only works with "legacy" google storage access so you'll need to enabled this) | |
| # 3. Your OAuth credentials which you setup from here https://code.google.com/apis/console/ by selecting "API Access" | |
| # Note that I choose "Create client ID" and then "Installed Application". | |
| # | |
| # This script is intended to be run as a regular background process (like a cron job) to process data. It has no access to a browser and no web server to expose a callback url. Hence the hacking of OAuth2. This seems completely wrong to me but I haven't gotten any other authentication with the API to work. If anyone knows a better way please post a comment! | |
| # |