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
{ | |
"StartAt": "PollQueue", | |
"States": { | |
"PollQueue": { | |
"Type": "Task", | |
"Resource": "arn:aws:lambda:XXX:XXX:function:sfn_poll_queue", | |
"Next": "CheckForWork" | |
}, | |
"CheckForWork": { | |
"Type": "Choice", |
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
diff --git a/server/main.js b/server/main.js | |
index 4c6ddc6e..11b1c792 100644 | |
--- a/server/main.js | |
+++ b/server/main.js | |
@@ -22,4 +22,15 @@ import "../imports/api/userdata.js"; | |
import "../imports/api/webPushSubscriptions.js"; | |
import "./leitner.js"; | |
+// npm install prom-client | |
+const promClient = require("prom-client"); |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<jmeterTestPlan version="1.2" properties="2.8" jmeter="2.13.20170723"> | |
<hashTree> | |
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="arsnova.voting" enabled="true"> | |
<stringProp name="TestPlan.comments"></stringProp> | |
<boolProp name="TestPlan.functional_mode">false</boolProp> | |
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp> | |
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="Benutzer definierte Variablen" enabled="true"> | |
<collectionProp name="Arguments.arguments"/> | |
</elementProp> |
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 code runs once per frame. Build units and command peons! | |
// Destroy the human base within 180 seconds. | |
// Run over 4000 statements per call and chooseAction will run less often. | |
// Check out the green Guide button at the top for more info. | |
var base = this; | |
function sortByCoinValue(a, b) { | |
return b.coin.bountyGold - a.coin.bountyGold; | |
} |
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 | |
incoming = [] | |
$stdin.each_line do |line| | |
segments = line.split(" ") | |
incoming.push({ | |
"old" => segments[0], | |
"new" => segments[1], | |
"ref" => segments[2] |
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
function rotating_indicator(indicator) { | |
var element = document.getElementById(indicator), | |
type = element.innerHTML, | |
next_type = "/"; | |
switch (type) { | |
case "\\": next_type = "|"; break; | |
case "|": next_type = "/"; break; | |
case "/": next_type = "\u2014"; break; | |
case "\u2014": next_type = "\\"; break; | |
} |
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
<?php | |
/* | |
PHP allows two possibilities to define a constructor: | |
1) Using the classic, Java-like way with a method named like the class, or | |
2) with the magic method named __construct. | |
Of these two possibilities, which one takes precedence? |
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/php | |
<?php | |
define('SVNLOOK', '/usr/bin/svnlook'); | |
// 1 = TXN, 2 = REPO | |
$command = SVNLOOK." changed -t {$_SERVER['argv'][1]} {$_SERVER['argv'][2]} | awk '{print \$2}' | grep -i \\.php\$"; | |
$handle = popen($command, 'r'); | |
if ($handle === false) { | |
echo 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL; | |
exit(2); | |
} |
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
SELECT AVG(Abschnitte) FROM (SELECT courseID, COUNT(courseID) AS Abschnitte FROM `planningsection` GROUP BY courseID) AS AbschnitteProKurs |
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
<?php | |
class Example extends SuperExample implements I0, I1, I2 { | |
const MY_TRUE = 1; | |
private $a = 0; | |
public function foo($a, $b) { | |
for ($i = 0; $i < 10; $i++) {} |
NewerOlder