From 0df56eaf045b759436de8d7722826be1f9f35e8b Mon Sep 17 00:00:00 2001 From: Jack Miner <3ch01c@gmail.com> Date: Tue, 23 Feb 2016 10:56:01 -0700 Subject: [PATCH] Removed sponsors --- bin/install-category | 5 +---- www/cgi-bin/moth.lua | 21 +++++++++------------ www/cgi-bin/puzzles.cgi | 8 ++++---- www/credits.html | 3 --- www/index.html | 13 +++++-------- www/register.html | 11 ++++------- www/scoring.html | 33 +++++++++++++++------------------ 7 files changed, 38 insertions(+), 56 deletions(-) diff --git a/bin/install-category b/bin/install-category index c769719..deceb3d 100755 --- a/bin/install-category +++ b/bin/install-category @@ -63,9 +63,6 @@ EOF
Puzzle by $author
- Los Alamos National Laboratory - US Department Of Energy - Sandia National Laboratories
@@ -140,7 +137,7 @@ for dn in $indir/[0-9]*; do done fi - # Append answers + # Append answers if [ -f $dn/00answer.txt ]; then awk -v P=$points '/./ { printf("%d %s\n", P, $0); }' < $dn/00answer.txt >> $uanswers else diff --git a/www/cgi-bin/moth.lua b/www/cgi-bin/moth.lua index 8eec67a..078a0e6 100644 --- a/www/cgi-bin/moth.lua +++ b/www/cgi-bin/moth.lua @@ -8,7 +8,7 @@ function moth.anchored_search(haystack, needle, anchor) if (not f) then return false, err end - + for line in f:lines() do if (anchor) then pos = line:find(anchor) @@ -16,13 +16,13 @@ function moth.anchored_search(haystack, needle, anchor) line = line:sub(pos+1) end end - + if (line == needle) then f:close() return true end end - + f:close() return false end @@ -41,9 +41,6 @@ function moth.page(title, body) print("") end print('
') - print('Los Alamos National Laboratory') - print('US Department Of Energy') - print('Sandia National Laboratories') print('
') print("") os.exit(0) @@ -60,31 +57,31 @@ function moth.award_points(team, category, points, comment) local filename = team .. "." .. category .. "." .. points local entry = team .. " " .. category .. " " .. points - + if (comment) then entry = entry .. " " .. comment end - + local f = io.open(moth.path("state/teams/" .. team)) if (f) then f:close() else return false, "No such team" end - + local ok = moth.anchored_search(moth.path("state/points.log"), entry, " ") if (ok) then return false, "Points already awarded" end - + local f = io.open(moth.path("state/points.new/" .. filename), "a") if (not f) then return false, "Unable to write to points file" end - + f:write(os.time(), " ", entry, "\n") f:close() - + return true end diff --git a/www/cgi-bin/puzzles.cgi b/www/cgi-bin/puzzles.cgi index 5b0cd40..41fd9f7 100755 --- a/www/cgi-bin/puzzles.cgi +++ b/www/cgi-bin/puzzles.cgi @@ -16,7 +16,7 @@ f:close() for line in io.lines(moth.path("state/points.log")) do local ts, team, cat, points, comment = line:match("^(%d+) (%w+) ([%w-]+) (%d+) ?(.*)") points = tonumber(points) or 0 - + -- Skip scores for removed categories if (max_by_cat[cat] ~= nil) then max_by_cat[cat] = math.max(max_by_cat[cat], points) @@ -32,7 +32,7 @@ for cat, biggest in pairs(max_by_cat) do for line in io.lines(moth.path("packages/" .. cat .. "/map.txt")) do points, dirname = line:match("^(%d+) (.*)") points = tonumber(points) - + body = body .. "" .. points .. " " if (points > biggest) then break @@ -44,8 +44,8 @@ for cat, biggest in pairs(max_by_cat) do body = body .. "\n" end body = body .. "\n" -body = body .. "
Sandia Token:" -body = body .. "

Example: sandia:5:xylep-radar-nanox

" +body = body .. "
External Token:" +body = body .. "

Example: external:5:xylep-radar-nanox

" body = body .. "
" body = body .. "Team Hash:
" body = body .. "Token: " diff --git a/www/credits.html b/www/credits.html index 55acf88..f1de93f 100644 --- a/www/credits.html +++ b/www/credits.html @@ -88,9 +88,6 @@ window.addEventListener("load", init);
- Los Alamos National Laboratory - US Department Of Energy - Sandia National Laboratories
diff --git a/www/index.html b/www/index.html index 962de79..e5a8aa1 100644 --- a/www/index.html +++ b/www/index.html @@ -16,10 +16,10 @@
  • Scoreboard
  • - +

    Getting Started

    - +

    Here is what you need to do:

    @@ -46,15 +46,15 @@
    - +

    Reading Material

    - +

    Stuck? Taking a break? Here are some things to read.

    - +
    - Los Alamos National Laboratory - US Department Of Energy - Sandia National Laboratories
    diff --git a/www/register.html b/www/register.html index 1f94238..3b9f628 100644 --- a/www/register.html +++ b/www/register.html @@ -7,7 +7,7 @@

    Team Registration

    - +

    Register Your Team

    @@ -18,19 +18,19 @@ so make sure it's the team name you actually want. Staff are unable to make changes to team names.

    - +

    If somebody on your team has already registered your hash, you don't need to do it again.

    - +
    -
    +
    @@ -42,9 +42,6 @@
    - Los Alamos National Laboratory - US Department Of Energy - Sandia National Laboratories
    diff --git a/www/scoring.html b/www/scoring.html index add1fd7..9884de8 100644 --- a/www/scoring.html +++ b/www/scoring.html @@ -8,7 +8,7 @@

    About scoring

    - +

    How we compute scores

    @@ -17,7 +17,7 @@ Each category is worth one point toward the total score; your team's score in a category is the fraction of the total points unlocked so far in that category.

    - +

    The team that has 30% of the points in each of five categories has 1.5 points, whereas the team that @@ -25,22 +25,22 @@ typically better to have a few points in many categories, than many points in a few categories.

    - +

    When points are unlocked in a category, every other team's score in that category goes down until they too score that point. Unlike previous years, however, unlocking points is the only way to reduce another team's score.

    - +

    There are two main ways to make points: puzzles and tokens. Your contest may have other ways to make points: these will either be automatic, or explained elsewhere.

    - - + +

    Puzzles

    @@ -52,8 +52,8 @@ correctly answers the highest-valued puzzle in that category.

    - - + +

    Tokens

    @@ -61,31 +61,31 @@ two forms: a single or multipoint token. A single point token for the "example" category might look like this:

    - +
    example:xylep-radar-nanox
    - +

    A 42 point token for the "example" category might look like this:

    - +
    example:42:xihyp-ropar-nanix
    - +

    Tokens are typically associated with "live" categories, such as a network-based service or a treasure hunt. Tokens can be submitted with the form on the welcome page, or you can write your own script to automate token submission.

    - +

    Some tokens change periodically, typically once a minute. If you find a token, it's worth looking in the same place again later to see if the token changes.

    - - + +

    About time

    @@ -114,9 +114,6 @@

    - Los Alamos National Laboratory - US Department Of Energy - Sandia National Laboratories