{"commit":"4c8ba9a9076ba2a6ef57f18927379ae541179282","subject":"installation.ash","message":"installation.ash\n","repos":"sosyco\/alpine-dockerhost","old_file":"installation.ash","new_file":"installation.ash","new_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\nsed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\napk update\napk upgrade\napk add git ansible sudo\nssh-keygen -f files\/dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\n","old_contents":"#!\/bin\/ash\n#\n# installation of needed packages\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# \napk update\napk upgrade\napk add git ansible sudo\nssh-keygen -f dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"dc61931a5cee09289eba7250e3cb5a680929d6d2","subject":"Fixed global search\/replace botches.","message":"Fixed global search\/replace botches.\n\n\ngit-svn-id: 28d9401aa571d5108e51b194aae6f24ca5964c06@20799 8cc4aa7f-3514-0410-904f-f2cc9021211c\n","repos":"crystalspace\/CS,crystalspace\/CS,crystalspace\/CS,crystalspace\/CS,crystalspace\/CS,crystalspace\/CS,crystalspace\/CS,crystalspace\/CS","old_file":"plugins\/video\/render3d\/software\/i386\/cs.ash","new_file":"plugins\/video\/render3d\/software\/i386\/cs.ash","new_contents":";--------=========xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=========--------\n;\n; Copyright (C) 1998 by Jorrit Tyberghein\n; Written by Andrew Zabolotny\n; General NASM macros\n;\n; This library is free software; you can redistribute it and\/or\n; modify it under the terms of the GNU Library General Public\n; License as published by the Free Software Foundation; either\n; version 2 of the License, or (at your option) any later version.\n;\n; This library is distributed in the hope that it will be useful,\n; but WITHOUT ANY WARRANTY; without even the implied warranty of\n; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n; Library General Public License for more details.\n;\n; You should have received a copy of the GNU Library General Public\n; License along with this library; if not, write to the Free\n; Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n;\n;--------=========xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=========--------\n\n%ifndef __CS_ASH__\n%define __CS_ASH__\n\n[WARNING -macro-selfref]\n\n; Define macros for switching to code, data and bss segments\n%ifidni __OUTPUT_FORMAT__,obj\n\t\tsegment\tTEXT32 use32 align=4 class=CODE flat\n\t\tsegment\tDATA32 use32 align=4 class=DATA flat\n\t\tsegment\tBSS32 use32 align=4 class=BSS flat\n;\t\tgroup\tFLAT\n;\t\tgroup\tDGROUP BSS32 DATA32\n\t\t%xdefine __TEXT_SECT__\tsegment TEXT32\n\t\t%xdefine __DATA_SECT__\tsegment DATA32\n\t\t%xdefine __BSS_SECT__\tsegment BSS32\n%else\n\t\t%xdefine __TEXT_SECT__\tsection .text\n\t\t%xdefine __DATA_SECT__\tsection .data\n\t\t%xdefine __BSS_SECT__\tsection .bss\n%endif\n\n__TEXT_SECT__\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Mangle a name to be compatible with the C compiler\n; Arguments:\n; The name\n; Example:\n;\t\tcname (my_func)\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%ifdef EXTERNC_UNDERSCORE\n\t\t%define\tcname(x) _ %+ x\n%else\n\t\t%define\tcname(x) x\n%endif\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Import an external C procedure definition\n; Arguments:\n; The name of external C procedure\n; Example:\n;\t\tcextern\tprintf\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tcextern\t1\n\t\t%xdefine %1 cname(%1)\n\t%ifidni __OUTPUT_FORMAT__,obj\n\t\textern\t%1:wrt FLAT\n\t%else\n\t\textern\t%1\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Export an C procedure definition\n; Arguments:\n; The name of C procedure\n; Example:\n;\t\tcglobal\tmy_printf\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tcglobal\t1\n\t\t%xdefine %1 cname(%1)\n\t\tglobal\t%1\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Misc macros to deal with PIC shared libraries\n; Comment:\n; Note that we have a different syntax for working with and without\n; PIC shared libraries. In a PIC environment we should load first\n; the address of the variable into a register and then work through\n; that address, i.e: mov eax,myvar; mov [eax],1\n; In a non-PIC environment we should directly write: mov myvar,1\n; Example:\n;\t\textvar\tmyvar\n;\t\tGetGOT\n;\t%ifdef PIC\n;\t\tmov\tebx,myvar\t; get offset of myvar into ebx\n;\t%else\n;\t\tlea\tebx,myvar\n;\t%endif\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%ifdef PIC\n\t\tcextern\t_GLOBAL_OFFSET_TABLE_\n\t%macro\tGetGOT\t0\n\t\t%ifdef .$proc.stkofs\n\t\t\t%assign .$proc.stkofs .$proc.stkofs+4\n\t\t%endif\n\t\tcall\t%$Get_GOT\n\t%$Get_GOT:\n\t\tpop\tebx\n\t\tadd\tebx,_GLOBAL_OFFSET_TABLE_ + $$ - %$Get_GOT wrt ..gotpc\n\t%endmacro\n\t%macro\textvar\t1\n\t\tcextern\t%1\n\t\t%xdefine %1 [ebx+%1 wrt ..got]\n\t%endmacro\n%else\n\t%define\tGetGOT\n\t%macro\textvar\t1\n\t\tcextern\t%1\n\t%endmacro\n%endif\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Begin a procedure definition\n; For performance reasons we don't use stack frame pointer EBP,\n; instead we're using the [esp+xx] addressing. Because of this\n; you should be careful when you work with stack pointer.\n; The push\/pop instructions are macros that are defined to\n; deal correctly with these issues.\n; Arguments:\n; First argument - the procedure name\n; Second optional argument - the number of bytes for local variables\n; The following arguments could specify the registers that should be\n; pushed at beginning of procedure and popped before exiting\n; Example:\n; proc\tMyTestProc\n; proc\tMyTestProc,4,ebx,esi,edi\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tproc\t1-3+ 0\n\t\tcglobal\t%1\n\t\t%push\t%1\n\t\talign\t16\n%1:\n\t\t%xdefine %$proc.name %1\n\t; total size of local arguments\n\t\t%assign %$proc.locsize (%2+3) & 0xFFFC\n\t; offset from esp to argument\n\t\t%assign\t%$proc.argofs 4+%$proc.locsize\n\t; additional offset to args (tracks push\/pops)\n\t\t%assign\t.$proc.stkofs 0\n\t; offset from esp to local arguments\n\t\t%assign %$proc.locofs 0\n\t; Now push the registers that we should save\n\t\t%define %$proc.save %3\n\t%if %$proc.locsize != 0\n\t\tsub\tesp,%$proc.locsize\n\t%endif\n\t\tpush\t%$proc.save\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Declare an argument passed on stack\n; This macro defines two additional macros:\n; first (with the name given by first argument) - [esp+xx]\n; second (with a underscore appended to first argument) - esp+xx\n; Arguments:\n; First argument defines the procedure argument name\n; Second optional parameter defines the size of the argument\n; Default value is 4 (a double word)\n; Example:\n;\t\targ\t.my_float\n;\t\targ\t.my_double,8\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\targ\t1-2 4\n\t%ifndef %$proc.argofs\n\t\t%error\t\"`arg' not in a proc context\"\n\t%else\n\t; Trick: temporary undefine .$proc.stkofs so that it won't be expanded\n\t\t%assign\t%%. .$proc.stkofs\n\t\t%undef .$proc.stkofs\n\t\t%xdefine %{1}_ esp+%$proc.argofs+.$proc.stkofs\n\t\t%xdefine %1 [esp+%$proc.argofs+.$proc.stkofs]\n\t\t%assign .$proc.stkofs %%.\n\t\t%assign %$proc.argofs %2+%$proc.argofs\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Declare an local variable\n; first (with the name given by first argument) - [esp+xx]\n; second (with a slash prefixing the first argument) - esp+xx\n; Arguments:\n; First argument defines the procedure argument name\n; Second optional parameter defines the size of the argument\n; Default value is 4 (a double word)\n; Example:\n;\t\tloc\t.int_value\n;\t\tloc\t.double_value,8\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tloc\t1-2 4\n\t%ifndef %$proc.locofs\n\t\t%error\t\"`loc' not in a proc context\"\n\t%elif %$proc.locofs + %2 > %$proc.locsize\n\t\t%error\t\"local stack space exceeded\"\n\t%else\n\t\t%assign\t%%. .$proc.stkofs\n\t\t%undef .$proc.stkofs\n\t\t%xdefine %{1}_ esp+%$proc.locofs+.$proc.stkofs\n\t\t%xdefine %1 [esp+%$proc.locofs+.$proc.stkofs]\n\t\t%assign .$proc.stkofs %%.\n\t\t%assign %$proc.locofs %$proc.locofs+%2\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Get the type of given size into context-local variable %$type\n; Arguments:\n; Size of type we want (1,2,4,8 or 10)\n; Example:\n;\t\ttype\t4\t; gives \"dword\"\n;\t\ttype\t10\t; gives \"tword\"\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\ttype\t1\n\t%if %1 = 1\n\t\t%define\t%$type byte\n\t%elif %1 = 2\n\t\t%define\t%$type word\n\t%elif %1 = 4\n\t\t%define\t%$type dword\n\t%elif %1 = 8\n\t\t%define\t%$type qword\n\t%elif %1 = 10\n\t\t%define\t%$type tword\n\t%else\n\t\t%define %$. %1\n\t\t%error \"unknown type for argument size %$.\"\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Same as `arg' but prepends \"word\", \"dword\" etc (typed arg)\n; first (with the name given by first argument) - dword [esp+xx]\n; second (with a slash prefixing the first argument) - esp+xx\n; Arguments:\n; Same as for `arg'\n; Example:\n;\t\ttarg\t.my_float\t; .my_float is now \"dword [esp+xxx]\"\n;\t\ttarg\t.my_double,8\t; .my_double is now \"qword [esp+xxx]\"\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\ttarg\t1-2 4\n\t%ifndef %$proc.argofs\n\t\t%error\t\"`targ' not in a proc context\"\n\t%else\n\t\targ\t%1,%2\n\t\ttype\t%2\n\t\t%assign\t%%. .$proc.stkofs\n\t\t%undef .$proc.stkofs\n\t\t%xdefine %1 %$type %1\n\t\t%assign .$proc.stkofs %%.\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Same as `loc' but prepends \"word\", \"dword\" etc (typed loc)\n; first (with the name given by first argument) - dword [esp+xx]\n; second (with a slash prefixing the first argument) - esp+xx\n; Arguments:\n; Same as for `loc'\n; Example:\n;\t\ttloc\tint_value\n;\t\ttloc\tdouble_value,8\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\ttloc\t1-2 4\n\t%ifndef %$proc.locofs\n\t\t%error\t\"`tloc' not in a proc context\"\n\t%else\n\t\tloc\t%1,%2\n\t\ttype\t%2\n\t\t%assign\t%%. .$proc.stkofs\n\t\t%undef .$proc.stkofs\n\t\t%xdefine %1 %$type %1\n\t\t%assign .$proc.stkofs %%.\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Finish a procedure\n; Gives an error if proc\/endproc pairs mismatch\n; Defines an label called __end_(procedure name)\n; which is useful for calculating function size\n; Arguments:\n; (optional) The name of procedure\n; Example:\n; endproc\tMyTestProc\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%push\ttmp\t; trick: define a dummy context to avoid error in next line\n%macro\t\tendproc\t0-1 %$proc.name\n\t%ifndef %$proc.argofs\n\t\t%error \"`endproc' not in a proc context\"\n\t%elifnidn %$proc.name,%1\n\t\t%define %$. %1\n\t\t%error \"endproc names mismatch: expected `%$proc.name'\"\n\t\t%error \"but got `%$.' instead\"\n\t%elif %$proc.locofs < %$proc.locsize\n\t\t%error\t\"unused local space declared (used %$proc.locofs, requested %$proc.locsize)\"\n\t%else\n%$exit:\n\t; Now pop the registers that we should restore on exit\n\t\tpop\t%$proc.save\n\t\t%if %$proc.locsize != 0\n\t\tadd\tesp,%$proc.locsize\n\t\t%endif\n\t\tret\n__end_%1:\n\t\t%pop\n\t%endif\n%endmacro\n%pop\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; A replacement for \"push\" for use within procedures\n; Arguments:\n; any number of registers which will be push'ed successively\n; Example:\n;\t\tpush\teax,ebx,ecx,edx\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tpush\t0-*\n; dummy comment to avoid problems with \"push\" on the same line with a label\n\t%rep\t%0\n\t\tpush\t%1\n\t\t%rotate\t1\n\t\t%assign .$proc.stkofs .$proc.stkofs+4\n\t%endrep\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; A replacement for \"pop\" for use within procedures\n; Arguments:\n; any number of registers which will be pop'ed in reverse order\n; Example:\n;\t\tpop\teax,ebx,ecx,edx\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tpop\t0-*\n; dummy comment to avoid problems with \"pop\" on the same line with a label\n\t%rep\t%0\n\t\t%rotate\t-1\n\t\tpop\t%1\n\t\t%assign .$proc.stkofs .$proc.stkofs-4\n\t%endrep\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Replacements for \"pushfd\" and \"popfd\" that takes care of esp\n; Example:\n;\t\tpushfd\n;\t\tpopfd\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tpushfd\t0\n\t\tpushfd\n\t\t%assign .$proc.stkofs .$proc.stkofs+4\n%endmacro\n%macro\t\tpopfd\t0\n\t\tpopfd\n\t\t%assign .$proc.stkofs .$proc.stkofs-4\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Exit from current procedure (optionally on given condition)\n; Arguments:\n; Either none or a condition code\n; Example:\n;\t\texit\n;\t\texit\tnz\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\texit\t0-1 mp\n\t\tj%1\tnear %$exit\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; start an conditional branch\n; Arguments:\n; A condition code\n; second (optional) argument - \"short\" (by default - \"near\")\n; Example:\n;\t\tif\tnz\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tif\t1-2 near\n; dummy comment to avoid problems with \"if\" on the same line with a label\n\t\t%push\tif\n\t\tj%-1\t%2 %$elseif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; define the \"else\" branch of a conditional statement\n; Arguments:\n; optionaly: \"short\" if jmp to endif is less than 128 bytes away\n; Example:\n;\t\telse\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\telse\t0-1\n\t%ifnctx if\n\t\t%error\t\"`else' without matching `if'\"\n\t%else\n\t\tjmp\t%1 %$endif\n%$elseif:\n\t\t%define\t%$elseif_defined\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Finish am conditional statement\n; Arguments:\n; none\n; Example:\n;\t\tendif\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tendif\t0\n\t%ifnctx if\n\t\t%error\t\"`endif' without matching `if'\"\n\t%else\n\t\t%ifndef %$elseif_defined\n%$elseif:\n\t\t%endif\n%$endif:\n\t\t%pop\n\t%endif\n%endmacro\n\n%endif ; __CS_ASH__\n","old_contents":";--------=========xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=========--------\n;\n; Copyright (C) 1998 by Jorrit Tyberghein\n; Written by Andrew Zabolotny\n; General NASM macros\n;\n; This library is free software; you can redistribute it and\/or\n; modify it under the terms of the GNU Library General Public\n; License as published by the Free Software Foundation; either\n; version 2 of the License, or (at your option) any later version.\n;\n; This library is distributed in the hope that it will be useful,\n; but WITHOUT ANY WARRANTY; without even the implied warranty of\n; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n; Library General Public License for more details.\n;\n; You should have received a copy of the GNU Library General Public\n; License along with this library; if not, write to the Free\n; Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n;\n;--------=========xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=========--------\n\n%ifndef __CS_ASH__\n%define __CS_ASH__\n\n[WARNING -macro-selfref]\n\n; Define macros for switching to code, data and bss segments\n%ifidni __OUTPUT_FORMAT__,obj\n\t\tsegment\tTEXT32 use32 align=4 class=CODE flat\n\t\tsegment\tDATA32 use32 align=4 class=DATA flat\n\t\tsegment\tBSS32 use32 align=4 class=BSS flat\n;\t\tgroup\tFLAT\n;\t\tgroup\tDGROUP BSS32 DATA32\n\t\t%xdefine __TEXT_SECT__\tsegment TEXT32\n\t\t%xdefine __DATA_SECT__\tsegment DATA32\n\t\t%xdefine __BSS_SECT__\tsegment BSS32\n%else\n\t\t%xdefine __TEXT_SECT__\tsection .text\n\t\t%xdefine __DATA_SECT__\tsection .data\n\t\t%xdefine __BSS_SECT__\tsection .bss\n%endif\n\n__TEXT_SECT__\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Mangle a name to be compatible with the C compiler\n; Arguments:\n; The name\n; Example:\n;\t\tcname (my_func)\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%ifdef EXTERNC_UNDERSCORE\n\t\t%define\tcname(x) _ %+ x\n%else\n\t\t%define\tcname(x) x\n%endif\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Import an external C procedure definition\n; Arguments:\n; The name of external C procedure\n; Example:\n;\t\tcextern\tcsPrintf\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tcextern\t1\n\t\t%xdefine %1 cname(%1)\n\t%ifidni __OUTPUT_FORMAT__,obj\n\t\textern\t%1:wrt FLAT\n\t%else\n\t\textern\t%1\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Export an C procedure definition\n; Arguments:\n; The name of C procedure\n; Example:\n;\t\tcglobal\tmy_csPrintf\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tcglobal\t1\n\t\t%xdefine %1 cname(%1)\n\t\tglobal\t%1\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Misc macros to deal with PIC shared libraries\n; Comment:\n; Note that we have a different syntax for working with and without\n; PIC shared libraries. In a PIC environment we should load first\n; the address of the variable into a register and then work through\n; that address, i.e: mov eax,myvar; mov [eax],1\n; In a non-PIC environment we should directly write: mov myvar,1\n; Example:\n;\t\textvar\tmyvar\n;\t\tGetGOT\n;\t%ifdef PIC\n;\t\tmov\tebx,myvar\t; get offset of myvar into ebx\n;\t%else\n;\t\tlea\tebx,myvar\n;\t%endif\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%ifdef PIC\n\t\tcextern\t_GLOBAL_OFFSET_TABLE_\n\t%macro\tGetGOT\t0\n\t\t%ifdef .$proc.stkofs\n\t\t\t%assign .$proc.stkofs .$proc.stkofs+4\n\t\t%endif\n\t\tcall\t%$Get_GOT\n\t%$Get_GOT:\n\t\tpop\tebx\n\t\tadd\tebx,_GLOBAL_OFFSET_TABLE_ + $$ - %$Get_GOT wrt ..gotpc\n\t%endmacro\n\t%macro\textvar\t1\n\t\tcextern\t%1\n\t\t%xdefine %1 [ebx+%1 wrt ..got]\n\t%endmacro\n%else\n\t%define\tGetGOT\n\t%macro\textvar\t1\n\t\tcextern\t%1\n\t%endmacro\n%endif\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Begin a procedure definition\n; For performance reasons we don't use stack frame pointer EBP,\n; instead we're using the [esp+xx] addressing. Because of this\n; you should be careful when you work with stack pointer.\n; The push\/pop instructions are macros that are defined to\n; deal correctly with these issues.\n; Arguments:\n; First argument - the procedure name\n; Second optional argument - the number of bytes for local variables\n; The following arguments could specify the registers that should be\n; pushed at beginning of procedure and popped before exiting\n; Example:\n; proc\tMyTestProc\n; proc\tMyTestProc,4,ebx,esi,edi\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tproc\t1-3+ 0\n\t\tcglobal\t%1\n\t\t%push\t%1\n\t\talign\t16\n%1:\n\t\t%xdefine %$proc.name %1\n\t; total size of local arguments\n\t\t%assign %$proc.locsize (%2+3) & 0xFFFC\n\t; offset from esp to argument\n\t\t%assign\t%$proc.argofs 4+%$proc.locsize\n\t; additional offset to args (tracks push\/pops)\n\t\t%assign\t.$proc.stkofs 0\n\t; offset from esp to local arguments\n\t\t%assign %$proc.locofs 0\n\t; Now push the registers that we should save\n\t\t%define %$proc.save %3\n\t%if %$proc.locsize != 0\n\t\tsub\tesp,%$proc.locsize\n\t%endif\n\t\tpush\t%$proc.save\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Declare an argument passed on stack\n; This macro defines two additional macros:\n; first (with the name given by first argument) - [esp+xx]\n; second (with a underscore appended to first argument) - esp+xx\n; Arguments:\n; First argument defines the procedure argument name\n; Second optional parameter defines the size of the argument\n; Default value is 4 (a double word)\n; Example:\n;\t\targ\t.my_float\n;\t\targ\t.my_double,8\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\targ\t1-2 4\n\t%ifndef %$proc.argofs\n\t\t%error\t\"`arg' not in a proc context\"\n\t%else\n\t; Trick: temporary undefine .$proc.stkofs so that it won't be expanded\n\t\t%assign\t%%. .$proc.stkofs\n\t\t%undef .$proc.stkofs\n\t\t%xdefine %{1}_ esp+%$proc.argofs+.$proc.stkofs\n\t\t%xdefine %1 [esp+%$proc.argofs+.$proc.stkofs]\n\t\t%assign .$proc.stkofs %%.\n\t\t%assign %$proc.argofs %2+%$proc.argofs\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Declare an local variable\n; first (with the name given by first argument) - [esp+xx]\n; second (with a slash prefixing the first argument) - esp+xx\n; Arguments:\n; First argument defines the procedure argument name\n; Second optional parameter defines the size of the argument\n; Default value is 4 (a double word)\n; Example:\n;\t\tloc\t.int_value\n;\t\tloc\t.double_value,8\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tloc\t1-2 4\n\t%ifndef %$proc.locofs\n\t\t%error\t\"`loc' not in a proc context\"\n\t%elif %$proc.locofs + %2 > %$proc.locsize\n\t\t%error\t\"local stack space exceeded\"\n\t%else\n\t\t%assign\t%%. .$proc.stkofs\n\t\t%undef .$proc.stkofs\n\t\t%xdefine %{1}_ esp+%$proc.locofs+.$proc.stkofs\n\t\t%xdefine %1 [esp+%$proc.locofs+.$proc.stkofs]\n\t\t%assign .$proc.stkofs %%.\n\t\t%assign %$proc.locofs %$proc.locofs+%2\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Get the type of given size into context-local variable %$type\n; Arguments:\n; Size of type we want (1,2,4,8 or 10)\n; Example:\n;\t\ttype\t4\t; gives \"dword\"\n;\t\ttype\t10\t; gives \"tword\"\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\ttype\t1\n\t%if %1 = 1\n\t\t%define\t%$type byte\n\t%elif %1 = 2\n\t\t%define\t%$type word\n\t%elif %1 = 4\n\t\t%define\t%$type dword\n\t%elif %1 = 8\n\t\t%define\t%$type qword\n\t%elif %1 = 10\n\t\t%define\t%$type tword\n\t%else\n\t\t%define %$. %1\n\t\t%error \"unknown type for argument size %$.\"\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Same as `arg' but prepends \"word\", \"dword\" etc (typed arg)\n; first (with the name given by first argument) - dword [esp+xx]\n; second (with a slash prefixing the first argument) - esp+xx\n; Arguments:\n; Same as for `arg'\n; Example:\n;\t\ttarg\t.my_float\t; .my_float is now \"dword [esp+xxx]\"\n;\t\ttarg\t.my_double,8\t; .my_double is now \"qword [esp+xxx]\"\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\ttarg\t1-2 4\n\t%ifndef %$proc.argofs\n\t\t%error\t\"`targ' not in a proc context\"\n\t%else\n\t\targ\t%1,%2\n\t\ttype\t%2\n\t\t%assign\t%%. .$proc.stkofs\n\t\t%undef .$proc.stkofs\n\t\t%xdefine %1 %$type %1\n\t\t%assign .$proc.stkofs %%.\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Same as `loc' but prepends \"word\", \"dword\" etc (typed loc)\n; first (with the name given by first argument) - dword [esp+xx]\n; second (with a slash prefixing the first argument) - esp+xx\n; Arguments:\n; Same as for `loc'\n; Example:\n;\t\ttloc\tint_value\n;\t\ttloc\tdouble_value,8\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\ttloc\t1-2 4\n\t%ifndef %$proc.locofs\n\t\t%error\t\"`tloc' not in a proc context\"\n\t%else\n\t\tloc\t%1,%2\n\t\ttype\t%2\n\t\t%assign\t%%. .$proc.stkofs\n\t\t%undef .$proc.stkofs\n\t\t%xdefine %1 %$type %1\n\t\t%assign .$proc.stkofs %%.\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Finish a procedure\n; Gives an error if proc\/endproc pairs mismatch\n; Defines an label called __end_(procedure name)\n; which is useful for calculating function size\n; Arguments:\n; (optional) The name of procedure\n; Example:\n; endproc\tMyTestProc\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%push\ttmp\t; trick: define a dummy context to avoid error in next line\n%macro\t\tendproc\t0-1 %$proc.name\n\t%ifndef %$proc.argofs\n\t\t%error \"`endproc' not in a proc context\"\n\t%elifnidn %$proc.name,%1\n\t\t%define %$. %1\n\t\t%error \"endproc names mismatch: expected `%$proc.name'\"\n\t\t%error \"but got `%$.' instead\"\n\t%elif %$proc.locofs < %$proc.locsize\n\t\t%error\t\"unused local space declared (used %$proc.locofs, requested %$proc.locsize)\"\n\t%else\n%$exit:\n\t; Now pop the registers that we should restore on exit\n\t\tpop\t%$proc.save\n\t\t%if %$proc.locsize != 0\n\t\tadd\tesp,%$proc.locsize\n\t\t%endif\n\t\tret\n__end_%1:\n\t\t%pop\n\t%endif\n%endmacro\n%pop\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; A replacement for \"push\" for use within procedures\n; Arguments:\n; any number of registers which will be push'ed successively\n; Example:\n;\t\tpush\teax,ebx,ecx,edx\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tpush\t0-*\n; dummy comment to avoid problems with \"push\" on the same line with a label\n\t%rep\t%0\n\t\tpush\t%1\n\t\t%rotate\t1\n\t\t%assign .$proc.stkofs .$proc.stkofs+4\n\t%endrep\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; A replacement for \"pop\" for use within procedures\n; Arguments:\n; any number of registers which will be pop'ed in reverse order\n; Example:\n;\t\tpop\teax,ebx,ecx,edx\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tpop\t0-*\n; dummy comment to avoid problems with \"pop\" on the same line with a label\n\t%rep\t%0\n\t\t%rotate\t-1\n\t\tpop\t%1\n\t\t%assign .$proc.stkofs .$proc.stkofs-4\n\t%endrep\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Replacements for \"pushfd\" and \"popfd\" that takes care of esp\n; Example:\n;\t\tpushfd\n;\t\tpopfd\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tpushfd\t0\n\t\tpushfd\n\t\t%assign .$proc.stkofs .$proc.stkofs+4\n%endmacro\n%macro\t\tpopfd\t0\n\t\tpopfd\n\t\t%assign .$proc.stkofs .$proc.stkofs-4\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Exit from current procedure (optionally on given condition)\n; Arguments:\n; Either none or a condition code\n; Example:\n;\t\texit\n;\t\texit\tnz\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\texit\t0-1 mp\n\t\tj%1\tnear %$exit\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; start an conditional branch\n; Arguments:\n; A condition code\n; second (optional) argument - \"short\" (by default - \"near\")\n; Example:\n;\t\tif\tnz\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tif\t1-2 near\n; dummy comment to avoid problems with \"if\" on the same line with a label\n\t\t%push\tif\n\t\tj%-1\t%2 %$elseif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; define the \"else\" branch of a conditional statement\n; Arguments:\n; optionaly: \"short\" if jmp to endif is less than 128 bytes away\n; Example:\n;\t\telse\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\telse\t0-1\n\t%ifnctx if\n\t\t%error\t\"`else' without matching `if'\"\n\t%else\n\t\tjmp\t%1 %$endif\n%$elseif:\n\t\t%define\t%$elseif_defined\n\t%endif\n%endmacro\n\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n; Summary:\n; Finish am conditional statement\n; Arguments:\n; none\n; Example:\n;\t\tendif\n;-----======xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx======-----\n%macro\t\tendif\t0\n\t%ifnctx if\n\t\t%error\t\"`endif' without matching `if'\"\n\t%else\n\t\t%ifndef %$elseif_defined\n%$elseif:\n\t\t%endif\n%$endif:\n\t\t%pop\n\t%endif\n%endmacro\n\n%endif ; __CS_ASH__\n","returncode":0,"stderr":"","license":"lgpl-2.1","lang":"AGS Script"} {"commit":"0e215abbf2e4eb3a2839ec3e6145c95375f633ef","subject":"Remove old script","message":"Remove old script\n","repos":"mikebryant\/kolmafia-lar-forecasting,mikebryant\/kolmafia-lar-forecasting","old_file":"src\/scripts\/lar-forecasting\/lar-get-encounter.ash","new_file":"src\/scripts\/lar-forecasting\/lar-get-encounter.ash","new_contents":"","old_contents":"notify \"LeaChim\";\n\nimport \"lar-forecasting.ash\";\n\nvoid main(string loc, int turn) {\n print(lar_encounter_to_string(lar_get_encounter(loc.to_location(), turn)));\n}\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"59a1b2b8d3fed8a9ecaa10aed01ea522a21eaa2c","subject":"go command static and dynamic","message":"go command static and dynamic\n","repos":"michalliu\/faux-go,michalliu\/faux-go","old_file":"autogen.ash","new_file":"autogen.ash","new_contents":"#!\/bin\/ash\necho \"compiling... be patient\"\n#gccgo -Wl,-t -v -o go-static `ls *.go | grep -v signal_notunix.go | grep -v _test.go | grep -v bootstrap | grep -v doc` -static-libgo\ngccgo -Wl,-t -v -o go `ls *.go | grep -v signal_notunix.go | grep -v _test.go | grep -v bootstrap | grep -v doc`\n","old_contents":"#!\/bin\/ash\necho \"compiling... be patient\"\ngccgo -Wl,-t -v -o go `ls *.go | grep -v signal_notunix.go | grep -v _test.go | grep -v bootstrap | grep -v doc` -static-libgo\n","returncode":0,"stderr":"","license":"bsd-3-clause","lang":"AGS Script"} {"commit":"a5cd381752071ba8ed39615ef66d857a850a76f0","subject":"improve autogen","message":"improve autogen\n","repos":"michalliu\/faux-go,michalliu\/faux-go","old_file":"autogen.ash","new_file":"autogen.ash","new_contents":"#!\/bin\/ash\necho \"compiling... be patient\"\ngccgo -Wl,-t -v -o go `ls *.go | grep -v signal_notunix.go | grep -v _test.go | grep -v bootstrap | grep -v doc` -static-libgo\n","old_contents":"#!\/bin\/ash\necho \"compiling... be patient\"\ngccgo -o go `ls *.go | grep -v signal_notunix.go | grep -v _test.go | grep -v bootstrap | grep -v doc` -static-libgo\n","returncode":0,"stderr":"","license":"bsd-3-clause","lang":"AGS Script"} {"commit":"9eb7bbb7bf83f8786c3c2722ec546f91fcb4078c","subject":"Update installation.ash","message":"Update installation.ash\n\nadd central containeradmin-account","repos":"sosyco\/alpine-dockerhost","old_file":"installation.ash","new_file":"installation.ash","new_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\nif ! [ -f \"\/etc\/apk\/repositories.org\" ]; \nthen \n cp \/etc\/apk\/repositories \/etc\/apk\/repositories.org\n sed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\nfi\napk update\napk upgrade\napk add git sudo docker\nrc-update add docker boot\n\n# add new user \"dockeradmin\" without password \n# and generate sshkeys\ngetent passwd dockeradmin > \/dev\/null 2&>1\nif ! [ $? -eq 0 ]; \nthen \n ssh-keygen -f dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\n adduser -D -S \/bin\/ash dockeradmin\n sed -i \"s\/dockeradmin\\:!\/dockeradmin\\:\/g\" \/etc\/shadow\n mkdir -p \/home\/dockeradmin\/.ssh\/\n cp dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\n chmod 700 -R \/home\/dockeradmin\/.ssh \n chown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\n echo \"dockeradmin ALL=(ALL) NOPASSWD: ALL\" >> \/etc\/sudoers\n adduser dockeradmin docker\nfi\nsed -i \"s\/DOCKER_OPTS.*\/DOCKER_OPTS=\\\"--bip=192.168.199.1\\\/24\\\"\/\" \/etc\/conf.d\/docker\necho \"don't forget to save the private sshkey: dockeardmin\"\n\n# generate containeradmin (if we need one)\nsh-keygen -f containeradmin -t rsa -b 4096 -C containeradmin -N ''\nmkdir -p \/home\/dockeradmin\/container\/ssh\/containeradmin\ncp containeradmin.pub \/home\/dockeradmin\/container\/ssh\/containeradmin\/authorized_keys\ncp containeradmin \/home\/dockeradmin\/.ssh\/containeradmin\nchmod 700 -R \/home\/dockeradmin\/.ssh \nchown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\nchmod 755 -R \/home\/dockeradmin\/container\/ssh\/containeradmin\n","old_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\nif ! [ -f \"\/etc\/apk\/repositories.org\" ]; \nthen \n cp \/etc\/apk\/repositories \/etc\/apk\/repositories.org\n sed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\nfi\napk update\napk upgrade\napk add git sudo docker\nrc-update add docker boot\n\n# add new user \"dockeradmin\" without password \n# and generate sshkeys\ngetent passwd dockeradmin > \/dev\/null 2&>1\nif ! [ $? -eq 0 ]; \nthen \n ssh-keygen -f dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\n adduser -D dockeradmin\n mkdir -p \/home\/dockeradmin\/.ssh\/\n cp dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\n chmod 700 -R \/home\/dockeradmin\/.ssh \n chown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\n echo \"dockeradmin ALL=(ALL) NOPASSWD: ALL\" >> \/etc\/sudoers\n adduser dockeradmin docker\nfi\nsed -i \"s\/DOCKER_OPTS.*\/DOCKER_OPTS=\\\"--bip=192.168.199.1\\\/24\\\"\/\" \/etc\/conf.d\/docker\necho \"don't forget to save the private sshkey: dockeardmin\"\n\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"44189584fa8d9e1d273b42a9a55faca295b44e50","subject":"installation.ash","message":"installation.ash\n","repos":"sosyco\/alpine-dockerhost","old_file":"installation.ash","new_file":"installation.ash","new_contents":"#!\/bin\/ash\n#\n# installation of needed packages\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# \napk update\napk upgrade\napk add git ansible sudo\nssh-keygen -f dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\n","old_contents":"#!\/bin\/ash\n#\n# installation of needed packages\napk update\napk upgrade\napk add ansible sudo\n\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"5716952ab6c92a863250c1af4bc6143c899e0fb0","subject":"installation.ash","message":"installation.ash\n","repos":"sosyco\/alpine-dockerhost","old_file":"installation.ash","new_file":"installation.ash","new_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\ncp \/etc\/apk\/repositories \/etc\/apk\/repositories.$(date \"+%Y%m%d-%H:%M:%S\")\nsed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\napk update\napk upgrade\napk add git ansible sudo docker\nssh-keygen -f files\/dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\n","old_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\ncp \/etc\/apk\/repositories \/etc\/apk\/repositories.$(date \"+%Y%m%d-%H:%M:%S\")\nsed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\napk update\napk upgrade\napk add git ansible sudo\nssh-keygen -f files\/dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"5094738139f7b03182a26f407209d5019c5a9254","subject":"installation.ash","message":"installation.ash\n","repos":"sosyco\/alpine-dockerhost","old_file":"installation.ash","new_file":"installation.ash","new_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\ncp \/etc\/apk\/repositories \/etc\/apk\/repositories.$(date \"+%Y%m%d-%H:%M:%S\")\nsed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\napk update\napk upgrade\napk add git ansible sudo docker\nssh-keygen -f files\/dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\nadduser -D dockeradmin\nmkdir -p \/home\/dockeradmin\/.ssh\/\ncp files\/dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\nchmod 664 -R \/home\/dockeradmin\/.ssh \nchown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\n","old_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\ncp \/etc\/apk\/repositories \/etc\/apk\/repositories.$(date \"+%Y%m%d-%H:%M:%S\")\nsed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\napk update\napk upgrade\napk add git ansible sudo docker\nssh-keygen -f files\/dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\nuseradd -D dockeradmin\nmkdir -p \/home\/dockeradmin\/.ssh\/\ncp files\/dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\nchmod 664 -R \/home\/dockeradmin\/.ssh \nchown dockeradmin.dockeradin -R \/home\/dockeradmin\/.ssh\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"f81362c5c140e494bac1525399601ecf5df1efd5","subject":"installation.ash","message":"installation.ash\n","repos":"sosyco\/alpine-dockerhost","old_file":"installation.ash","new_file":"installation.ash","new_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\ncp \/etc\/apk\/repositories \/etc\/apk\/repositories.$(date \"+%Y%m%d-%H:%M:%S\")\nsed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\napk update\napk upgrade\napk add git ansible sudo docker\nssh-keygen -f files\/dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\nadduser -D dockeradmin\nmkdir -p \/home\/dockeradmin\/.ssh\/\ncp files\/dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\nchmod 700 -R \/home\/dockeradmin\/.ssh \nchown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\n","old_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\ncp \/etc\/apk\/repositories \/etc\/apk\/repositories.$(date \"+%Y%m%d-%H:%M:%S\")\nsed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\napk update\napk upgrade\napk add git ansible sudo docker\nssh-keygen -f files\/dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\nadduser -D dockeradmin\nmkdir -p \/home\/dockeradmin\/.ssh\/\ncp files\/dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\nchmod 664 -R \/home\/dockeradmin\/.ssh \nchown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"ab485558612087af8f05f5f8610ae3107da03d28","subject":"Also check for not having the monster order data","message":"Also check for not having the monster order data\n","repos":"mikebryant\/kolmafia-lar-forecasting,mikebryant\/kolmafia-lar-forecasting","old_file":"src\/scripts\/lar-forecasting\/lar-forecasting.ash","new_file":"src\/scripts\/lar-forecasting\/lar-forecasting.ash","new_contents":"notify \"LeaChim\";\n\nrecord lar_roll {\n int minimum;\n int maximum;\n};\n\nstatic {\n \/\/ lar_cnc_rolls[turn]\n lar_roll [int] lar_cnc_rolls;\n\n \/\/ lar_monster_rolls[turn][retry]\n lar_roll [int, int] lar_monster_rolls;\n\n \/\/ lar_monster_orders[location][0]\n monster [location][int] lar_monster_orders;\n\n \/\/ lar_combat_percentags[location]\n int [location] lar_combat_percentages;\n}\n\nvoid lar_load_data() {\n file_to_map(\"lar_cnc_rolls.txt\", lar_cnc_rolls);\n file_to_map(\"lar_monster_rolls.txt\", lar_monster_rolls);\n file_to_map(\"lar_monster_orders.txt\", lar_monster_orders);\n file_to_map(\"lar_combat_percentages.txt\", lar_combat_percentages);\n}\n\n\/\/ Auto load data\nstatic {\n lar_load_data();\n}\nlar_load_data();\n\nboolean lar_encounter_is_combat_with_roll(int roll, location loc) {\n int cpc = lar_combat_percentages[loc];\n return (roll > cpc);\n}\n\nboolean lar_encounter_is_combat(location loc, int turn) {\n lar_roll roll = lar_cnc_rolls[turn];\n return lar_encounter_is_combat_with_roll((roll.minimum + roll.maximum) \/ 2, loc);\n}\n\nboolean lar_encounter_is_combat(location loc) {\n return lar_encounter_is_combat(loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_is_combat(boolean guess, location loc, int turn) {\n if (!(lar_combat_percentages contains loc)) {\n return false;\n }\n if (!(lar_cnc_rolls contains turn)) {\n return false;\n }\n if (guess) {\n return true;\n }\n lar_roll roll = lar_cnc_rolls[turn];\n if (lar_encounter_is_combat_with_roll(roll.minimum, loc) == lar_encounter_is_combat_with_roll(roll.maximum, loc)) {\n \/\/ The whole range agrees, so we're not guessing\n return true;\n }\n return false;\n}\n\nboolean lar_encounter_known_is_combat(boolean guess, location loc) {\n return lar_encounter_known_is_combat(guess, loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_is_combat(location loc) {\n return lar_encounter_known_is_combat(false, loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_is_combat(location loc, int turn) {\n return lar_encounter_known_is_combat(false, loc, turn);\n}\n\n\n\n\n\n\/\/ monsters\nmonster lar_encounter_monster_with_roll(int roll, location loc) {\n \/\/int cpc = lar_combat_percentages[loc];\n \/\/return (roll > cpc);\n monster [int] monsters = lar_monster_orders[loc];\n return monsters[(roll-1)\/(100\/count(monsters))];\n}\n\nmonster lar_encounter_monster(location loc, int turn) {\n lar_roll roll = lar_monster_rolls[turn][0];\n return lar_encounter_monster_with_roll((roll.minimum + roll.maximum) \/ 2, loc);\n}\n\nmonster lar_encounter_monster(location loc) {\n return lar_encounter_monster(loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_monster(boolean guess, location loc, int turn) {\n if(!(lar_monster_orders contains loc)) {\n return false;\n }\n if (!lar_encounter_known_is_combat(guess, loc, turn)) {\n return false;\n }\n if(!(lar_monster_rolls contains turn)) {\n return false;\n }\n if (guess) {\n return true;\n }\n lar_roll roll = lar_monster_rolls[turn][0];\n if (lar_encounter_monster_with_roll(roll.minimum, loc) == lar_encounter_monster_with_roll(roll.maximum, loc)) {\n return true;\n }\n return false;\n}\n\nboolean lar_encounter_known_monster(boolean guess, location loc) {\n return lar_encounter_known_monster(guess, loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_monster(location loc) {\n return lar_encounter_known_monster(false, loc);\n}\n\nboolean lar_encounter_known_monster(location loc, int turn) {\n return lar_encounter_known_monster(false, loc, turn);\n}\n\n\nstring lar_get_known_info(location loc, int turn) {\n string cnc = \"unknown\";\n if (lar_encounter_known_is_combat(loc, turn)) {\n if (lar_encounter_is_combat(loc, turn)) {\n cnc = \"combat\";\n } else {\n cnc = \"noncombat\";\n }\n }\n\n if (cnc != \"unknown\") {\n return(loc + \" -> \" + cnc);\n }\n\n return \"\";\n}\n\nstring lar_get_known_info(location loc) {\n return lar_get_known_info(loc, my_turncount() + 1);\n}\n","old_contents":"notify \"LeaChim\";\n\nrecord lar_roll {\n int minimum;\n int maximum;\n};\n\nstatic {\n \/\/ lar_cnc_rolls[turn]\n lar_roll [int] lar_cnc_rolls;\n\n \/\/ lar_monster_rolls[turn][retry]\n lar_roll [int, int] lar_monster_rolls;\n\n \/\/ lar_monster_orders[location][0]\n monster [location][int] lar_monster_orders;\n\n \/\/ lar_combat_percentags[location]\n int [location] lar_combat_percentages;\n}\n\nvoid lar_load_data() {\n file_to_map(\"lar_cnc_rolls.txt\", lar_cnc_rolls);\n file_to_map(\"lar_monster_rolls.txt\", lar_monster_rolls);\n file_to_map(\"lar_monster_orders.txt\", lar_monster_orders);\n file_to_map(\"lar_combat_percentages.txt\", lar_combat_percentages);\n}\n\n\/\/ Auto load data\nstatic {\n lar_load_data();\n}\nlar_load_data();\n\nboolean lar_encounter_is_combat_with_roll(int roll, location loc) {\n int cpc = lar_combat_percentages[loc];\n return (roll > cpc);\n}\n\nboolean lar_encounter_is_combat(location loc, int turn) {\n lar_roll roll = lar_cnc_rolls[turn];\n return lar_encounter_is_combat_with_roll((roll.minimum + roll.maximum) \/ 2, loc);\n}\n\nboolean lar_encounter_is_combat(location loc) {\n return lar_encounter_is_combat(loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_is_combat(boolean guess, location loc, int turn) {\n if (!(lar_combat_percentages contains loc)) {\n return false;\n }\n if (!(lar_cnc_rolls contains turn)) {\n return false;\n }\n if (guess) {\n return true;\n }\n lar_roll roll = lar_cnc_rolls[turn];\n if (lar_encounter_is_combat_with_roll(roll.minimum, loc) == lar_encounter_is_combat_with_roll(roll.maximum, loc)) {\n \/\/ The whole range agrees, so we're not guessing\n return true;\n }\n return false;\n}\n\nboolean lar_encounter_known_is_combat(boolean guess, location loc) {\n return lar_encounter_known_is_combat(guess, loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_is_combat(location loc) {\n return lar_encounter_known_is_combat(false, loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_is_combat(location loc, int turn) {\n return lar_encounter_known_is_combat(false, loc, turn);\n}\n\n\n\n\n\n\/\/ monsters\nmonster lar_encounter_monster_with_roll(int roll, location loc) {\n \/\/int cpc = lar_combat_percentages[loc];\n \/\/return (roll > cpc);\n monster [int] monsters = lar_monster_orders[loc];\n return monsters[(roll-1)\/(100\/count(monsters))];\n}\n\nmonster lar_encounter_monster(location loc, int turn) {\n lar_roll roll = lar_monster_rolls[turn][0];\n return lar_encounter_monster_with_roll((roll.minimum + roll.maximum) \/ 2, loc);\n}\n\nmonster lar_encounter_monster(location loc) {\n return lar_encounter_monster(loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_monster(boolean guess, location loc, int turn) {\n if (!lar_encounter_known_is_combat(guess, loc, turn)) {\n return false;\n }\n if(!(lar_monster_rolls contains turn)) {\n return false;\n }\n if (guess) {\n return true;\n }\n lar_roll roll = lar_monster_rolls[turn][0];\n if (lar_encounter_monster_with_roll(roll.minimum, loc) == lar_encounter_monster_with_roll(roll.maximum, loc)) {\n return true;\n }\n return false;\n}\n\nboolean lar_encounter_known_monster(boolean guess, location loc) {\n return lar_encounter_known_monster(guess, loc, my_turncount() + 1);\n}\n\nboolean lar_encounter_known_monster(location loc) {\n return lar_encounter_known_monster(false, loc);\n}\n\nboolean lar_encounter_known_monster(location loc, int turn) {\n return lar_encounter_known_monster(false, loc, turn);\n}\n\n\nstring lar_get_known_info(location loc, int turn) {\n string cnc = \"unknown\";\n if (lar_encounter_known_is_combat(loc, turn)) {\n if (lar_encounter_is_combat(loc, turn)) {\n cnc = \"combat\";\n } else {\n cnc = \"noncombat\";\n }\n }\n\n if (cnc != \"unknown\") {\n return(loc + \" -> \" + cnc);\n }\n\n return \"\";\n}\n\nstring lar_get_known_info(location loc) {\n return lar_get_known_info(loc, my_turncount() + 1);\n}\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"87aa72b187703204a52ddaf0466abf5ae3b7424d","subject":"installation.ash","message":"installation.ash\n","repos":"sosyco\/alpine-dockerhost","old_file":"installation.ash","new_file":"installation.ash","new_contents":"#!\/bin\/ash\n#\n# installation of needed packages\napk update\napk upgrade\napk add ansible sudo\n\n","old_contents":"#!\/bin\/ash\n#\n# installation of needed packages\napk update\napk upgrade\napk add ansible\n\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"ffc0cf8f558c254b4ce7bc6cc77d11910778cc37","subject":"installation.ash","message":"installation.ash\n","repos":"sosyco\/alpine-dockerhost","old_file":"installation.ash","new_file":"installation.ash","new_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\nif ! [ -f \"\/etc\/apk\/repositories.org\" ]; \nthen \n cp \/etc\/apk\/repositories \/etc\/apk\/repositories.org\n sed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\nfi\napk update\napk upgrade\napk add git sudo docker\nrc-update add docker boot\n\n# add new user \"dockeradmin\" without password \n# and generate sshkeys\ngetent passwd dockeradmin > \/dev\/null 2&>1\nif ! [ $? -eq 0 ]; \nthen \n ssh-keygen -f dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\n adduser -D dockeradmin\n mkdir -p \/home\/dockeradmin\/.ssh\/\n cp dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\n chmod 700 -R \/home\/dockeradmin\/.ssh \n chown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\n echo \"dockeradmin ALL=(ALL) NOPASSWD: ALL\" >> \/etc\/sudoers\n adduser dockeradmin docker\nfi\nsed -i \"s\/DOCKER_OPTS.*\/DOCKER_OPTS=\\\"--bip=192.168.199.1\\\/24\\\"\/\" \/etc\/conf.d\/docker\necho \"don't forget to save the private sshkey: dockeardmin\"\n\n","old_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\nif ! [ -f \"\/etc\/apk\/repositories.org\" ]; \nthen \n cp \/etc\/apk\/repositories \/etc\/apk\/repositories.org\n sed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\nfi\napk update\napk upgrade\napk add git sudo docker\n# add new user \"dockeradmin\" without password \n# and generate sshkeys\ngetent passwd dockeradmin > \/dev\/null 2&>1\nif ! [ $? -eq 0 ]; \nthen \n ssh-keygen -f dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\n adduser -D dockeradmin\n mkdir -p \/home\/dockeradmin\/.ssh\/\n cp dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\n chmod 700 -R \/home\/dockeradmin\/.ssh \n chown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\n echo \"dockeradmin ALL=(ALL) NOPASSWD: ALL\" >> \/etc\/sudoers\n adduser dockeradmin docker\nfi\nsed -i \"s\/DOCKER_OPTS.*\/DOCKER_OPTS=\\\"--bip=192.168.199.1\\\/24\\\"\/\" \/etc\/conf.d\/docker\necho \"don't forget to save the private sshkey: dockeardmin\"\n\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"8ca6dca0cb948103fadcb99273b2893434def337","subject":"installation.ash","message":"installation.ash\n","repos":"sosyco\/alpine-dockerhost","old_file":"installation.ash","new_file":"installation.ash","new_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\ncp \/etc\/apk\/repositories \/etc\/apk\/repositories.$(date \"+%Y%m%d-%H:%M:%S\")\nsed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\napk update\napk upgrade\napk add git ansible sudo docker\nssh-keygen -f files\/dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\nadduser -D dockeradmin\nmkdir -p \/home\/dockeradmin\/.ssh\/\ncp files\/dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\nchmod 700 -R \/home\/dockeradmin\/.ssh \nchown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\necho \"dockeradmin ALL=(ALL) NOPASSWD: ALL\" >> \/etc\/sudoers\n","old_contents":"#!\/bin\/ash\n#\n# startscript: normaly run it only once\n# (c) 2015\/2016 sosyco@googlemail.com www.sosyco.de\n# \n# enhance the repositories and update the system\ncp \/etc\/apk\/repositories \/etc\/apk\/repositories.$(date \"+%Y%m%d-%H:%M:%S\")\nsed -ni 'p; s\/\\\/main\/\\\/community\/p' \/etc\/apk\/repositories\napk update\napk upgrade\napk add git ansible sudo docker\nssh-keygen -f files\/dockeradmin -t rsa -b 4096 -C dockeradmin -N ''\nadduser -D dockeradmin\nmkdir -p \/home\/dockeradmin\/.ssh\/\ncp files\/dockeradmin.pub \/home\/dockeradmin\/.ssh\/authorized_keys\nchmod 700 -R \/home\/dockeradmin\/.ssh \nchown dockeradmin.dockeradmin -R \/home\/dockeradmin\/.ssh\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"799b7ea815f84cc7542c1766d59d21a6fc43647b","subject":"Another test","message":"Another test\n","repos":"mikebryant\/kolmafia-lar-forecasting,mikebryant\/kolmafia-lar-forecasting","old_file":"src\/scripts\/lar-forecasting\/lar-test.ash","new_file":"src\/scripts\/lar-forecasting\/lar-test.ash","new_contents":"notify \"LeaChim\";\n\nimport \"lar-forecasting.ash\";\n\nvoid main() {\n\n print(\"Combat percentages:\");\n foreach key, value in lar_combat_percentages {\n print(key.to_string() + \": \" + value);\n }\n\n if (!(lar_encounter_known_is_combat(false, $location[sonofa beach], 576))) {\n print(\"Fail: We should know the combat status of sonofa beach at turn 576\");\n }\n\n if (lar_encounter_is_combat($location[the dark heart of the woods], 23)) {\n print(\"Fail: Dark heart 23 is NC\");\n }\n\n if (lar_encounter_is_combat($location[the spooky forest], 23)) {\n print(\"Fail: Spooky 23 is NC\");\n }\n\n if((lar_encounter_monster($location[the spooky forest], 1) != $monster[triffid])) {\n print(\"Fail: Spooky forest turn 1 should be a triffid\");\n }\n\n if((lar_encounter_monster($location[sonofa beach], 1) != $monster[lobsterfrogman])) {\n print(\"Fail: Sonofa beach turn 422 should be a lobsterfrogman\");\n }\n\n}\n","old_contents":"notify \"LeaChim\";\n\nimport \"lar-forecasting.ash\";\n\nvoid main() {\n\n print(\"Combat percentages:\");\n foreach key, value in lar_combat_percentages {\n print(key.to_string() + \": \" + value);\n }\n\n if (!(lar_encounter_known_is_combat(false, $location[sonofa beach], 576))) {\n print(\"Fail: We should know the combat status of sonofa beach at turn 576\");\n }\n\n if (lar_encounter_is_combat($location[the dark heart of the woods], 23)) {\n print(\"Fail: Spooky 23 is NC\");\n }\n\n if((lar_encounter_monster($location[the spooky forest], 1) != $monster[triffid])) {\n print(\"Fail: Spooky forest turn 1 should be a triffid\");\n }\n\n if((lar_encounter_monster($location[sonofa beach], 1) != $monster[lobsterfrogman])) {\n print(\"Fail: Sonofa beach turn 422 should be a lobsterfrogman\");\n }\n\n}\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"552849e3d082430f92e2182d72c234c380f8fd1e","subject":"Update generate_ssl_cert.ash","message":"Update generate_ssl_cert.ash","repos":"frozenfoxx\/util,frozenfoxx\/util,frozenfoxx\/util,frozenfoxx\/util","old_file":"web\/generate_ssl_cert.ash","new_file":"web\/generate_ssl_cert.ash","new_contents":"#!\/usr\/bin\/env ash\n\n# Variables\nBITS=${BITS:-'2048'}\nCERT_DIR=${CERT_DIR:-'\/etc\/ssl\/certs'}\nDAYS=${DAYS:-'365'}\nFQDN=${FQDN:-\"example.churchoffoxx.net\"}\n\n# Functions\n\n## Create the PEM format file\ncreate_pem()\n{\n cat ${CERT_DIR}\/${FQDN}.crt ${CERT_DIR}\/${FQDN}.key | tee ${CERT_DIR}\/${FQDN}.pem\n}\n\n## Create the certificate\ngenerate_cert()\n{\n # Create the key and CSR\n openssl req -nodes \\\n -newkey rsa:${BITS} \\\n -keyout ${CERT_DIR}\/${FQDN}.key \\\n -out ${CERT_DIR}\/${FQDN}.csr \\\n -subj \"\/C=US\/ST=State\/L=Town\/O=Church of Foxx\/OU=Example\/CN=${FQDN}\"\n\n # Sign the CSR\n openssl x509 -req \\\n -days ${DAYS} \\\n -in ${CERT_DIR}\/${FQDN}.csr \\\n -signkey ${CERT_DIR}\/${FQDN}.key \\\n -out ${CERT_DIR}\/${FQDN}.crt\n}\n\n## Check if the cert directory exists\nmake_cert_dir()\n{\n # Create the directory if it doesn't exist yet\n if [[ -n ${CERT_DIR} ]]; then\n mkdir -p ${CERT_DIR}\n fi\n}\n\n## Display usage information\nusage()\n{\n echo \"Usage: [Environment Variables] generate_ssl_cert.ash [options]\"\n echo \" Environment Variables:\"\n echo \" BITS bits for the certificate (default: '2048')\"\n echo \" CERT_DIR directory to output to (default: '\/etc\/ssl\/certs')\"\n echo \" DAYS days the cert is valid for (default: '365')\"\n echo \" FQDN fully qualified domain name of the server (default: example.churchoffoxx.net)\"\n}\n\n# Logic\n\n## Argument parsing\nwhile [[ \"$1\" != \"\" ]]; do\n case $1 in\n -h | --help ) usage\n exit 0\n ;;\n * ) usage\n exit 1\n esac\n shift\ndone\n\nmake_cert_dir\ngenerate_cert\ncreate_pem\n","old_contents":"#!\/usr\/bin\/env ash\n\n# Variables\nBITS=${BITS:-'2048'}\nCERT_DIR=${CERT_DIR:-'\/etc\/ssl\/certs'}\nDAYS=${DAYS:-'365'}\nFQDN=${FQDN:-\"example.churchoffoxx.net\"}\n\n# Functions\n\n## Create the PEM format file\ncreate_pem()\n{\n cat ${CERT_DIR}\/${FQDN}.crt ${CERT_DIR}\/${FQDN}.key | tee ${CERT_DIR}\/${FQDN}.pem\n}\n\n## Create the certificate\ngenerate_cert()\n{\n # Create the key and CSR\n openssl req -nodes \\\n -newkey rsa:${BITS} \\\n -keyout ${CERT_DIR}\/${FQDN}.key \\\n -out ${CERT_DIR}\/${FQDN}.csr \\\n -subj \"\/C=US\/ST=State\/L=Town\/O=Church of Foxx\/OU=Example\/CN=${FQDN}\"\n\n # Sign the CSR\n openssl x509 -req \\\n -days ${DAYS} \\\n -in ${CERT_DIR}\/${FQDN}.csr \\\n -signkey ${CERT_DIR}\/${FQDN}.key \\\n -out ${CERT_DIR}\/${FQDN}.crt\n}\n\n## Check if the cert directory exists\nmake_cert_dir()\n{\n # Create the directory if it doesn't exist yet\n if [[ -n ${CERT_DIR} ]]; then\n mkdir -p ${CERT_DIR}\n fi\n}\n\n## Display usage information\nusage()\n{\n echo \"Usage: [Environment Variables] generate_ssl_cert.ash [options]\"\n echo \" Environment Variables:\"\n echo \" FQDN fully qualified domain name of the server (default: example.churchoffoxx.net)\"\n}\n\n# Logic\n\n## Argument parsing\nwhile [[ \"$1\" != \"\" ]]; do\n case $1 in\n -h | --help ) usage\n exit 0\n ;;\n * ) usage\n exit 1\n esac\n shift\ndone\n\nmake_cert_dir\ngenerate_cert\ncreate_pem\n","returncode":0,"stderr":"","license":"apache-2.0","lang":"AGS Script"} {"commit":"66105f84ada17ad6b53ab308b3d24f7017ca0b21","subject":"Remove testing qualifier","message":"Remove testing qualifier\n","repos":"Ezandora\/Guide,Ezandora\/Guide,Ezandora\/Guide","old_file":"Source\/relay\/Guide\/Quests\/Sea.ash","new_file":"Source\/relay\/Guide\/Quests\/Sea.ash","new_contents":"\/\/merkinQuestPath\n\nRecord StringHandle\n{\n string s;\n};\n\nvoid QSeaInit()\n{\n\tif (!__misc_state[\"In aftercore\"])\n\t\treturn;\n \n \/\/Have they adventured anywhere underwater?\n boolean have_adventured_in_relevant_area = false;\n foreach l in $locations[the briny deeps, the brinier deepers, the briniest deepests, an octopus's garden,the wreck of the edgar fitzsimmons, the mer-kin outpost, madness reef,the marinara trench, the dive bar,anemone mine, the coral corral, mer-kin elementary school,mer-kin library,mer-kin gymnasium,mer-kin colosseum,the caliginous abyss]\n {\n if (l.turnsAttemptedInLocation() > 0)\n {\n have_adventured_in_relevant_area = true;\n break;\n }\n }\n \/\/don't list the quest unless they've started on the path under the sea:\n if (!have_adventured_in_relevant_area && $items[Mer-kin trailmap,Mer-kin lockkey,Mer-kin stashbox,wriggling flytrap pellet,damp old boot,Grandma's Map,Grandma's Chartreuse Yarn,Grandma's Fuchsia Yarn,Grandma's Note].available_amount() == 0)\n return;\n \n \n\t\/\/FIXME support mom\n if (true)\n {\n QuestState state;\n \n string quest_path = get_property(\"merkinQuestPath\");\n if (quest_path == \"done\")\n QuestStateParseMafiaQuestPropertyValue(state, \"finished\");\n else\n {\n QuestStateParseMafiaQuestPropertyValue(state, \"started\");\n }\n \n state.quest_name = \"Sea Quest\";\n state.image_name = \"Sea\";\n \n __quest_state[\"Sea Temple\"] = state;\n }\n if (true)\n {\n QuestState state;\n \n QuestStateParseMafiaQuestProperty(state, \"questS02Monkees\", false); \/\/don't issue a quest load\n state.quest_name = \"Hey, Hey, They're Sea Monkees\";\n state.image_name = \"Sea\";\n \n \n __quest_state[\"Sea Monkees\"] = state;\n }\n}\n\nvoid QSeaGenerateTempleEntry(ChecklistSubentry subentry, StringHandle image_name)\n{\n string path = get_property(\"merkinQuestPath\");\n \n boolean can_fight_dad_sea_monkee = $items[Goggles of Loathing,Stick-Knife of Loathing,Scepter of Loathing,Jeans of Loathing,Treads of Loathing,Belt of Loathing,Pocket Square of Loathing].items_missing().count() <= 1;\n \n boolean have_one_outfit = false;\n if (can_fight_dad_sea_monkee)\n have_one_outfit = true;\n foreach outfit_name in $strings[Mer-kin Scholar's Vestments,Mer-kin Gladiatorial Gear,Crappy Mer-kin Disguise]\n {\n if (have_outfit_components(outfit_name))\n {\n have_one_outfit = true;\n break;\n }\n }\n \n \n if (!have_one_outfit)\n {\n subentry.entries.listAppend(\"Acquire crappy mer-kin disguise from grandma sea monkee.\");\n return;\n }\n \n boolean at_boss = false;\n boolean at_gladiator_boss = false;\n boolean at_scholar_boss = false;\n if (path == \"gladiator\")\n {\n image_name.s = \"Shub-Jigguwatt\";\n at_gladiator_boss = true;\n }\n else if (path == \"scholar\")\n {\n image_name.s = \"Yog-Urt\";\n at_scholar_boss = true;\n }\n at_boss = at_gladiator_boss || at_scholar_boss;\n \n if (!at_boss || at_gladiator_boss)\n {\n string [int] description;\n string [int] modifiers;\n \/\/gladiator:\n if (at_gladiator_boss)\n {\n description.listAppend(\"Buff muscle, equip a powerful weapon.\");\n description.listAppend(\"Delevel him with crayon shavings for a bit, then attack with your weapon.\");\n description.listAppend(\"Make sure not to have anything along that will attack him. (saucespheres, familiars, hand in glove, etc)\");\n if (my_mp() > 0)\n description.listAppend(\"Try to reduce your MP to 0 before fighting him.\");\n }\n else\n {\n if (!have_outfit_components(\"Mer-kin Gladiatorial Gear\"))\n {\n description.listAppend(\"Acquire gladiatorial outfit.|Components can be found by running +combat in the gymnasium.\");\n modifiers.listAppend(\"+combat\");\n }\n else\n {\n string shrap_suggestion = \"Shrap is nice for this.\";\n if (!$skill[shrap].have_skill())\n {\n if ($item[warbear metalworking primer (used)].available_amount() > 0)\n {\n shrap_suggestion += \" (use your used copy of warbear metalworking primer)\";\n }\n else\n shrap_suggestion += \" (from warbear metalworking primer)\";\n }\n modifiers.listAppend(\"spell damage percent\");\n modifiers.listAppend(\"mysticality\");\n description.listAppend(\"Fight in the colosseum!\");\n description.listAppend(\"Easy way is to buff mysticality and spell damage percent, then cast powerful spells.|\" + shrap_suggestion);\n description.listAppend(\"There's another way, but it's a bit complicated. Check the wiki?\");\n }\n }\n string modifier_string = \"\";\n if (modifiers.count() > 0)\n modifier_string = ChecklistGenerateModifierSpan(modifiers);\n if (description.count() > 0)\n subentry.entries.listAppend(\"Gladiator path\" + HTMLGenerateIndentedText(modifier_string + description.listJoinComponents(\"