To use this, reference this file's path in the modules attr for your system config:
darwinConfigurations.${hostname} = nix-darwin.lib.darwinSystem {
modules = [
./lib/dnsmasq.nix
];
};To use this, reference this file's path in the modules attr for your system config:
darwinConfigurations.${hostname} = nix-darwin.lib.darwinSystem {
modules = [
./lib/dnsmasq.nix
];
};I hereby claim:
To claim this, I am signing this object:
First, head here to join our Zoom meeting. It will help me following along while you work through the assignment.
Write a program that calculates purchase price for movie tickets using any language you like. It should not be a full-blown web app; it can be a simple class or collection of methods invokable by your test suite. We'll provide you with some requirements, test-cases, and even a sample interface - all you have to do is give us some software.
I hereby claim:
To claim this, I am signing this object:
| #!/usr/bin/env ruby | |
| require 'connection_pool' | |
| require 'redis' | |
| COUNT=1000 | |
| $pool = ConnectionPool.new(size: 5, timeout: 10) { Redis.new } | |
| def dont_leak_connection |
| source "http://rubygems.org" | |
| gem "janky", "~>0.9" | |
| gem "pg" | |
| gem "thin" |
| IFS="$(printf '\n\t')" | |
| mkdir -p ~/.ssh | |
| if ! [[ -f ~/.ssh/authorized_keys ]]; then | |
| echo "Creating new ~/.ssh/authorized_keys" | |
| touch ~/.ssh/authorized_keys | |
| fi | |
| user=$1 |
| 2013-07-21 11:08:37.055 AM App Store[28267]: *** WARNING: Method userSpaceScaleFactor in class NSWindow | |
| is deprecated on 10.7 and later. It should not be used in new applications. Use | |
| convertRectToBacking: instead. | |
| 2013-07-21 11:08:38.344 AM storeagent[20851]: *** Assertion failure in | |
| -[SoftwareInstallOperation _startInstall], | |
| /SourceCache/Pisa/Pisa-135.30/iTunes Protocol/Built Into App/SoftwareInstallOperation.m:235 | |
| 2013-07-21 11:08:38.345 AM storeagent[20851]: error Error Domain=NSURLErrorDomain Code=-1100 "The | |
| installation could not be started." UserInfo=0x7fdd74042b70 {NSLocalizedDescription=The installation | |
| could not be started., NSUnderlyingError=0x7fdd78803550 "The requested URL was not found on this | |
| server."} |
| <fields> | |
| <!-- Valid attributes for fields: | |
| name: mandatory - the name for the field | |
| type: mandatory - the name of a previously defined type from the | |
| <types> section | |
| indexed: true if this field should be indexed (searchable or sortable) | |
| stored: true if this field should be retrievable | |
| compressed: [false] if this field should be stored using gzip compression | |
| (this will only apply if the field type is compressable; among | |
| the standard field types, only TextField and StrField are) |
| finished = [] | |
| ips = [] | |
| range = 1..254 | |
| range.each do |i| | |
| ip_address = "192.168.111.#{i}" | |
| Thread.new do | |
| `ping -q -c1 -W1 #{ip_address}`.split(/\n+/)[2].split(/,\s*/)[1].to_i > 0 and ips << ip_address | |
| finished << i | |
| end |