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
| numnodes=2 | |
| baseip="192.168.10" | |
| #global script | |
| $global = <<SCRIPT | |
| #check for private key for vm-vm comm | |
| [ -f /vagrant/id_rsa ] || { | |
| ssh-keygen -t rsa -f /vagrant/id_rsa -q -N '' | |
| } |
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
| ==> default: | |
| ==> default: Oracle Database 11g Express Edition Configuration | |
| ==> default: ------------------------------------------------- | |
| .. | |
| ==> default: | |
| ==> default: Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]: | |
| ==> default: Starting Oracle Net Listener... | |
| ==> default: Done | |
| ==> default: Configuring database... | |
| ==> default: Done |
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
| q |
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
| function checkField(element, parent) | |
| { | |
| if ($(element).attr("type") == "radio") { | |
| if ($("input[name=" + $(element).attr("name") + "]:checked").length > 0) { | |
| if (!$(element).parent().hasClass("filled")) { | |
| if ($(parent).data("required").filled < ($(parent).data("required").total)) { | |
| $(parent).data("required").filled++; | |
| $(element).parent().addClass("filled"); | |
| } | |
| } |
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
| key=ENV['key'] | |
| vars = Hash.new | |
| vars["key"]=ENV['key'] | |
| Vagrant.configure(2) do |config| | |
| config.vm.box = "hashicorp/precise32" | |
| config.vm.provision "shell", inline: "echo var key=#{key}" | |
| config.vm.provision "shell", path: "provision.sh", args: "arg1", env: vars | |
| 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
| :zerkms: |
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
| #configuration of host resolv | |
| $resolv = <<-EOF | |
| cat > /etc/resolv.conf <<EOF2 | |
| search local | |
| nameserver 127.0.0.1 | |
| EOF2 | |
| EOF | |
| $hosts = <<-EOF |
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
| // http://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/EWD654.html | |
| // http://www.cs.utexas.edu/users/EWD/ewd06xx/EWD654.PDF | |
| // F(2n) = (2*F(n-1) + F(n) )*F(n) | |
| // F(2n-1) = F(n-1)^2 + F(n)^2 | |
| unsigned long intfibdijkstra(unsigned long n) { | |
| static std::vector<unsigned long> values = {0,1,1}; | |
| if (n == 0 ) { | |
| return values[n]; |
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
| #settings for vm | |
| #name of vm to current directory | |
| vm_prefix = Pathname.new(Dir.getwd).basename.to_s | |
| vm_folder = "vagrant-vsphere/#{vm_prefix}" | |
| vm_number = 3 | |
| vm_ram = 1024 | |
| vm_cpu = 2 | |
| vm_datastore = "sas" | |
| #scripts |
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
| #enable rdp | |
| Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Terminal Server" -Name fDenyTSConnections -Type DWord -Value 0 | |
| #remove NLA | |
| # NLA (Network Level Authentication) | |
| $NLA = Get-WmiObject -Class Win32_TSGeneralSetting -ComputerName "." -Namespace root\CIMV2\TerminalServices -Authentication PacketPrivacy | |
| #0 disable | |
| #1 enable | |
| $NLA.SetUserAuthenticationRequired(0) | |
| # Recreate the WMI object so we can read out the (hopefully changed) setting |