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
| # Get Octpress. | |
| $ git clone git://github.com/imathis/octopress.git octopress | |
| $ cd octopress | |
| # Check your ruby version and edit .rbenv-version | |
| $ rbenv versions | |
| system | |
| * 2.0.0-p0 | |
| $ vim .rbenv-version |
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
| $ cd [your_octopress_dir] | |
| $ git add . | |
| $ git commit -m '[message]' | |
| $ git remote add bitbucket git@bitbucket.org:[username]/[your_repository].git | |
| $ git push -u bitbucket |
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
| # A Liquid tag for Jekyll sites that allows embedding Gists and showing code for non-JavaScript enabled browsers and readers. | |
| # by: Brandon Tilly | |
| # Source URL: https://gist.github.com/1027674 | |
| # Post http://brandontilley.com/2011/01/31/gist-tag-for-jekyll.html | |
| # | |
| # Example usage: {% gist 1027674 gist_tag.rb %} //embeds a gist for this plugin | |
| require 'cgi' | |
| require 'digest/md5' | |
| require 'net/https' |
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
| source "https://rubygems.org" | |
| gem 'chef' | |
| gem 'knife-solo', '0.3.0.pre3' | |
| gem 'knife-solo_data_bag' | |
| gem 'berkshelf' |
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
| $ bundle exec knife configure | |
| WARNING: No knife configuration file found | |
| Where should I put the config file? [/Users/shinyay/.chef/knife.rb] | |
| Please enter the chef server URL: [http://Shinya-MBA-2011.local:4000] | |
| Please enter an existing username or clientname for the API: [shinyay] | |
| Please enter the validation clientname: [chef-validator] | |
| Please enter the location of the validation key: [/etc/chef/validation.pem] | |
| Please enter the path to a chef repository (or leave blank): | |
| ***** |
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
| # | |
| # Cookbook Name:: base_packages | |
| # Recipe:: default | |
| # | |
| # Copyright 2013, YOUR_COMPANY_NAME | |
| # | |
| # All rights reserved - Do Not Redistribute | |
| # | |
| %w{sysstat mosh}.each do |pkg| | |
| package pkg do |
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
| $ brew update | |
| error: The following untracked working tree files would be overwritten by merge: | |
| Library/Formula/libarchive.rb | |
| Please move or remove them before you can merge. | |
| Aborting | |
| Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master | |
| # I deal with the error as follows | |
| $ cd /usr/local/Library/Formula |
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
| Shinya-MBA-2011:~ shinyay$ mysql.server start | |
| Starting MySQL | |
| . SUCCESS! | |
| Shinya-MBA-2011:~ shinyay$ mysql_secure_installation | |
| NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL | |
| SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY! |
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
| { | |
| "id": "deploy", | |
| "name": "deploy", | |
| "password": "$1$7hCJ0c6m$hc6Y0cFNAcRf/ulITCz/k1", | |
| "ssh-key": "ssh-rsa AAAAB3NzaC1yc2..... | |
| } |
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
| user = Chef::EncryptedDataBagItem.load("users", 'deploy') | |
| user_name = user['name'] | |
| password = user['password'] | |
| ssh_key = user['ssh_key'] | |
| home = "/home/#{user_name}" | |
| # Create a User [deploy] | |
| user user_name do | |
| password password | |
| home home |
OlderNewer