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
<domain type='kvm'> | |
<name>trusty</name> | |
<memory unit='KiB'>524288</memory> | |
<currentMemory unit='KiB'>524288</currentMemory> | |
<vcpu placement='static'>1</vcpu> | |
<os> | |
<type arch='x86_64' machine='pc-1.2'>hvm</type> | |
<boot dev='hd'/> | |
</os> |
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
give_info = "true" | |
count_shared_disk = 2 | |
size_shared_disk = 10 | |
#path_shared_disk = "/some/path" | |
config.vm.provider :virtualbox do |vb| | |
vb.name = vm_name_db + "." + Time.now.strftime("%y%m%d%H%M") | |
vb.customize ["modifyvm", :id, "--memory", memory_DB_INSTANCES] | |
vb.customize ["modifyvm", :id, "--cpus", num_CORE] | |
vb.customize ["modifyvm", :id, "--groups", "/collab"] | |
#first shared disk port |
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 |
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
// 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
#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
: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
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
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
q |