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
file = File.read("tuzzio.txt") | |
while (line = file.gets) | |
puts line | |
end | |
file.close |
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
# Launch PowerCLI and login when prompted | |
Connect-VIServer myserver.com | |
# PowerCLI now shows "connected to myserver.com as root" at top. | |
Get-VMHostStorage | |
# Get-VMHostStorage : 1/4/2012 10:18:20 AM Get-VMHostStorage Object reference not set to an instance of an object. | |
# At line:1 char:18 | |
# + Get-VMHostStorage <<<< | |
# + CategoryInfo : NotSpecified: (:) [Get-VMHostStorage], VimException | |
# + FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.GetVMHostStorage |
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
Nginx / Passegener tries to grab the wrong URL for PCRE. | |
To fix: | |
cd /home/gitlabhq | |
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.13.tar.gz && tar xvf pcre-8.13.tar.gz | |
wget http://nginx.org/download/nginx-1.0.11.tar.gz && tar xvf nginx-1.0.11.tar.gz | |
Re-run "sudo passenger-install-nginx-module" and choose option 2. |
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
sudo mate yourusername.conf | |
You will see this: | |
<Directory "/Users/yourusername/Sites/"> | |
Options Indexes MultiViews | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> |
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
Options +FollowSymlinks | |
RewriteEngine on | |
RewriteRule * /?page=$1 [NC] |
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
[Wed, 02 Nov 2011 03:18:46 +0100] INFO: *** Chef 0.10.4 *** | |
[Wed, 02 Nov 2011 03:18:46 +0100] INFO: Setting the run_list to ["enterprise-configure"] from JSON | |
[Wed, 02 Nov 2011 03:18:46 +0100] INFO: Run List is [recipe[enterprise-configure]] | |
[Wed, 02 Nov 2011 03:18:46 +0100] INFO: Run List expands to [enterprise-configure] | |
[Wed, 02 Nov 2011 03:18:46 +0100] INFO: Starting Chef Run for enterprise-11-10-23-i386 | |
[Wed, 02 Nov 2011 03:18:46 +0100] ERROR: Running exception handlers | |
[Wed, 02 Nov 2011 03:18:46 +0100] ERROR: Exception handlers complete | |
[Wed, 02 Nov 2011 03:18:46 +0100] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out | |
[Wed, 02 Nov 2011 03:18:46 +0100] FATAL: ArgumentError: wrong number of arguments (0 for 1) |
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
module ApplicationHelper | |
def markdown(text) | |
Redcarpet.new(text).to_html.html_safe | |
end | |
end |
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
I don't see how this: | |
if (foo) | |
{ | |
// something | |
} | |
is more readable than this: | |
if (foo) { |
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
# use glob syntax | |
syntax: glob | |
*.obj | |
*.exe | |
*.pdb | |
*.user | |
*.aps | |
*.pch | |
*.vspscc |
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
require 'rubygems' | |
require 'prawn' | |
require 'prawn/core' | |
require 'prawn/layout' | |
require 'fastercsv' | |
require 'awesome_print' | |
# Parse the CSV | |
residents = FasterCSV.read("residents.csv") | |
ap residents |