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
> sudo pip install ansible | |
... | |
checking for gcc... gcc | |
checking whether the C compiler works... no | |
configure: error: in `/private/tmp/pip_build_root/pycrypto': | |
configure: error: C compiler cannot create executables |
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
------------------------------------------------------------------------------- | |
ISTEAUT-225 Report | |
------------------------------------------------------------------------------- | |
Start Time: : 2014-02-28 18:35:23 -0500 | |
End Time: : 2014-02-28 18:35:27 -0500 | |
Duration: : 3 s | |
------------------------------------------------------------------------------- |
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 ruby | |
class C | |
def foo | |
def bar | |
puts "I am bar." | |
end | |
bar | |
end | |
end |
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
require 'java' | |
java_import javax.swing.TransferHandler | |
java_import javax.swing.Action | |
cut = TransferHandler.getCutAction | |
puts "Cut action is an instance of class #{cut.class}." | |
cut.putValue('fruit', 'mango') | |
puts "retrieved fruit value = '#{cut.getValue('fruit')}'." |
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
<script type="text/coffeescript" src="assets/barChart.coffee"></script> | |
<script type="text/coffeescript"> | |
window.showBySite() | |
</script> |
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
coffee> obj = { x: 3, y: 4 } | |
{ x: 3, y: 4 } | |
coffee> keys = (key for key of obj) | |
[ 'x', 'y' ] | |
coffee> vals = keys.map (key) -> obj[key] | |
[ 3, 4 ] |
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
class Base | |
def initialize(thing) | |
puts thing | |
end | |
end | |
class Derived < Base | |
def initialize(a_thing) | |
super() | |
end |
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
TASK: [Install needed gems. (Can install several with one command if needed)] *** | |
<99.99.99.99> ESTABLISH CONNECTION FOR USER: kbennett | |
<99.99.99.99> REMOTE_MODULE gem name=my_gem state=present user_install=no | |
<99.99.99.99> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/Users/kbennett/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '99.99.99.99', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1400612491.6-209146241172243 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1400612491.6-209146241172243 && echo $HOME/.ansible/tmp/ansible-tmp-1400612491.6-209146241172243'"] | |
<99.99.99.99> PUT /var/folders/y0/f7tfl1t52vlg79cknv71nr01r1rz9t/T/tmphAJi8c TO /home/kbennett/.ansible/tmp/ansible-tmp-1400612491.6-209146241172243/gem | |
<99.99.99.99> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'Co |
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 rspec | |
def leap_year?(year) | |
is_mult_of = ->(year, multiplier) { year % multiplier == 0 } | |
return false unless is_mult_of.(year, 4) | |
return true unless is_mult_of.(year, 100) | |
return is_mult_of.(year, 400) | |
end |
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
2.1.2 :010 > h = { fruit: 'mango' } | |
=> {:fruit=>"mango"} | |
2.1.2 :011 > a = [h, h] | |
=> [{:fruit=>"mango"}, {:fruit=>"mango"}] | |
2.1.2 :013 > puts a.to_yaml | |
--- | |
- &1 | |
:fruit: mango | |
- *1 | |
=> nil |
OlderNewer