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
[Unit] | |
Description=Network Manager Trigger Scan | |
Requisite=NetworkManager.service | |
After=NetworkManager-wait-online.service | |
Before=network-online.target | |
[Service] | |
Type=oneshot | |
ExecStart=/usr/bin/nmcli device wifi rescan |
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
var airtunes = require('../lib/'), | |
spawn = require('child_process').spawn, | |
argv = require('optimist') | |
.usage('Usage: $0 --host [host] --port [num] --pacat [path] --source [source] --volume [num] --password [string]') | |
.default('port', 5000) | |
.default('volume', 50) | |
.default('pacat', '/usr/bin/pacat') | |
.default('source', 'nullsink.monitor') | |
.demand(['host']) | |
.argv; |
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
def multiple_of_three_or_five(x:Int) = x % 3 == 0 || x % 5 == 0 | |
def sum_of_multiples(upperlimit: Int) = | |
(for (n <- 1 until upperlimit if multiple_of_three_or_five(n)) yield n).sum | |
println(sum_of_multiples(1000)) |
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
<? | |
// this is more the PHP-way | |
// requires the bcmath extension so make sure your shared hosting provider has it. | |
is_even($argv[1]); | |
function is_even($number) { | |
$oldnumber = $number; | |
goto a; | |
result: |