pkg_add http://pkgsrc.joyent.com/sdc6/2012Q1/i386/All/smtools
# note this is going to shut down the VM
sm-prepare-image
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
################################## | |
# MIT LICENSE | |
# Copyright (C) 2012 Luke Bayes | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
gem 'omniauth' | |
gem 'omniauth-facebook' | |
gem 'clearance' |
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
# this define allows us to inject a file into the catalog so it | |
# transfers over to the client in one big blog, instead of the client having to | |
# hit up the puppet file server for each file (meaning, 1 additional HTTP request | |
# per file) | |
define ops::install_file( | |
$ensure = present, | |
$filetype = "bin", | |
$module = $module_name, | |
$filename = $name, |
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
# this calls ops::install_file to install each file in our directory defined in | |
# ops::install_file ... in our case, /usr/local/ops/bin by default. | |
class ops::mysql_scripts { | |
ops::install_file{[ | |
"mye", | |
"mysql-init", | |
"mysql-vars", | |
]:} |
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
# Here's the script I'll use to demonstrate - it just loops forever: | |
$ cat test.rb | |
#!/usr/bin/env ruby | |
loop do | |
sleep 1 | |
end | |
# Now, I'll start the script in the background, and redirect stdout and stderr |
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 | |
# Use this to send and receive files | |
# Dependencies: | |
# SSH-Keys setup for root users. I recommend using agent forwarding for this. | |
# mbuffer installed in /opt/local/bin/mbuffer. Adjust to reality. | |
# | |
# This script presumes: | |
# zsnapper is installed. Comment out the two lines where it is referenced if you don't use it | |
DATE=$(date +%Y%m%d%H%M) |
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/env bash | |
# http://superuser.com/questions/109213/is-there-a-tool-that-can-test-what-ssl-tls-cipher-suites-a-particular-website-of | |
# OpenSSL requires the port number. | |
SERVER=$1 | |
DELAY=0 | |
ciphers=$(openssl ciphers 'ALL:eNULL' | sed -e 's/:/ /g') | |
echo Obtaining cipher list from $(openssl version). |
http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html
- The wordlist contains 1626 words.
- All words are between 4 and 7 letters long.
- No word in the list is a prefix of another word (e.g. visit, visitor).
- Five letter prefixes of words are sufficient to be unique.
- The words should be usable by people all over the world. The list is far from perfect in that respect. It is heavily biased towards western culture and English in particular. The international vocabulary is simply not big enough. One can argue that even words like "hotel" or "radio" are not truly international. You will find many English words in the list but I have tried to limit them to words that are part of a beginner's vocabulary or words that have close relatives in other european languages. In some cases a word has a different meaning in another language or is pronounced very differently but for the purpose of the encoding it is still ok - I assume that when the encoding is
OlderNewer