We'll assume an OS X Mavericks (10.9) box here.
You'll need:
- Vagrant
- Vagrant's VMware Fusion provider
# RUBY | |
require 'openssl' | |
require 'digest/sha2' | |
require 'json' | |
def bin2hex(str) | |
str.unpack('C*').map{ |b| "%02X" % b }.join('') | |
end |
#!/bin/bash | |
### BEGIN INIT INFO | |
#### BASED ON THE GIST: https://gist.github.com/2623205 | |
# Provides: unicorn | |
# Required-Start: $all | |
# Required-Stop: $network $local_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start the unicorns at boot | |
# Description: Enable at boot time. |
$ python | |
Python 2.7.8 (default, Jul 2 2014, 10:14:46) | |
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from bson.objectid import ObjectId | |
>>> import datetime | |
>>> ObjectId.from_datetime(datetime.datetime(2014, 8, 1)) | |
ObjectId('53dad8800000000000000000') |
Contributor: Adam Edwards | |
1. Install chocolatey – http://chocolatey.org | |
2. Install PSReadline to give PowerShell readline power – use the –emacs mode in your PowerShell profile so you have history search and other keyboard behavior like bash: https://github.com/lzybkr/PSReadLine | |
3. Use chocolatey to install ConEmu, a terminal replacement that supports ANSI colors, dynamic resizing, “normal” text selection and cut and paste, and lots of other customizations: cinst conemu. And set the startup shell for ConEmu to PowerShell (not cmd.exe) | |
4. Use chocolatey to install an editor – if you’re not already an emacs or vim person, use it to install Atom or Sublime, or Notepad++ | |
5. Always use PowerShell – do not use cmd.exe | |
6. Install ChefDK and use chef shell-init powershell to get at your Chef Ruby environment. | |
7. Use Pantry – it can automate #1, 3, 4, and 6 and will probably have support for #2. https://github.com/chef/pantry-chef-repo | |
8. If you get stuck on a box where you don’t an editor or chocolatey and need to e |
#!/bin/bash -eu | |
# Show all events for CF stack until update completes or fails. | |
cf_tail() { | |
local stack="$1" | |
local current | |
local final_line | |
local output | |
local previous | |
until echo "$current" | egrep -q "${stack}.*_(COMPLETE|FAILED)" ; do |
#@ /etc/quagga/bgpd.conf (Centos & Ubuntu) | |
hostname <Local OS hostname> | |
password <Any random phrase> | |
enable password <Any random phrase> | |
! | |
log file /var/log/quagga/bgpd | |
!debug bgp events | |
!debug bgp zebra | |
debug bgp updates |
#!/bin/bash | |
# | |
# Look, you are not supoposed to do this. But dang it, it speeds up recompiles by a lot. | |
# | |
echo "job count is: " `defaults read com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTask` | |
echo "Changing to: $1" | |
defaults write com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTask $1 | |
echo "job count is now: " `defaults read com.apple.dt.Xcode IDEBuildOperationMaxNumberOfConcurrentCompileTask` |
#!/bin/bash | |
set -e | |
exec > >(tee -a /var/log/eb-cfn-init.log|logger -t [eb-cfn-init] -s 2>/dev/console) 2>&1 | |
PREINIT_CMD=' | |
{ | |
"api_version" : "1.0", | |
"request_id": "0", | |
"command_name": "CMD-PreInit" |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: homebridge | |
# Required-Start: $network $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Start daemon at boot time | |
# Description: Enable service provided by daemon. | |
### END INIT INFO |