diff --git a/12345.sh b/12345.sh index d98ebe01..9ba7221f 100755 --- a/12345.sh +++ b/12345.sh @@ -349,6 +349,7 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh # echo "cat ~/.zen/tmp/miz.json | jq -r .[].secret" if [[ -s ~/.zen/tmp/coucou/${MOATS}.astroindex.html ]]; then + echo "GOT TW CACHE !!" tiddlywiki --load ~/.zen/tmp/coucou/${MOATS}.astroindex.html --output ~/.zen/tmp --render '.' 'miz.json' 'text/plain' '$:/core/templates/exporters/JsonFile' 'exportFilter' 'MadeInZion' OLDIP=$(cat ~/.zen/tmp/miz.json | jq -r .[].secret) [[ ! $OLDIP ]] && (echo "$HTTPCORS 501 ERROR - SORRY - YOUR TW IS OUT OF SWARM#0 - CONTINUE " | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "(☓‿‿☓) Execution time was "`expr $end - $start` seconds. && continue @@ -377,8 +378,9 @@ echo "" > ~/.zen/tmp/.ipfsgw.bad.twt # TODO move in 20h12.sh echo "$G1PUB" > ~/.zen/game/players/$PLAYER/.g1pub OLDIP=${myIP} fi - # ACTIVE GATEWAY - TWIP=$OLDIP + wasLAN=$(echo $OLDIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/") + [[ ! $wasLAN ]] && TWIP=$OLDIP || TWIP=$myIP + echo "*********** OFFICIAL LOGIN GOES TO $TWIP" else (echo "$HTTPCORS ERROR - NO ACTIVE TW FOUND - $(cat ~/.zen/game/players/$PLAYER/ipfs/moa/.chain.*)" | nc -l -p ${PORT} -q 1 > /dev/null 2>&1 &) && echo "(☓‿‿☓) Execution time was "`expr $end - $start` seconds. && continue diff --git a/20h12.process.sh b/20h12.process.sh index 764383ce..a20e1746 100755 --- a/20h12.process.sh +++ b/20h12.process.sh @@ -52,4 +52,8 @@ fi ######################################################################## end=`date +%s` echo "20H12 (♥‿‿♥) Execution time was "`expr $end - $start` seconds. + +## MAIL LOG : support@qo-op.com +$MY_PATH/tools/mailjet.sh "support@qo-op.com" "/tmp/20h12.log.txt" + exit 0 diff --git a/install.sh b/install.sh index 99129eee..935bafba 100755 --- a/install.sh +++ b/install.sh @@ -89,7 +89,7 @@ echo "## INSTALLATION AstroGEEK OpenCV = 'Intelligence Amie' - DEV - " ## MAILJET SSMTP RELAYING : ADD YOUR CREDENTIALS sudo cp ~/.zen/Astroport.ONE/templates/.ssmtprc /etc/ssmtp/ssmtp.conf sudo chmod 600 /etc/ssmtp/ssmtp.conf -sudo echo "$USER:fred@g1sms.fr:mail.asycn.io:587" >> /etc/ssmtp/revaliases +sudo echo "$USER:support@g1sms.fr:mail.asycn.io:587" >> /etc/ssmtp/revaliases ## Correct PDF restrictions for imagemagick echo "# Correction des droits export PDF imagemagick" diff --git a/templates/tw/$ _plugins_felixhayashi_hotzone.json b/templates/tw/$ _plugins_felixhayashi_hotzone.json new file mode 100644 index 00000000..9cd37c6d --- /dev/null +++ b/templates/tw/$ _plugins_felixhayashi_hotzone.json @@ -0,0 +1 @@ +[{"text":"{\n \"tiddlers\": {\n \"$:/plugins/felixhayashi/hotzone/config.js\": {\n \"title\": \"$:/plugins/felixhayashi/hotzone/config.js\",\n \"text\": \"/*\\\\\\n\\ntitle: $:/plugins/felixhayashi/hotzone/config.js\\ntype: application/javascript\\nmodule-type: library\\n\\n@preserve\\n\\n\\\\*/\\n(function(){\\\"use strict\\\";exports.config={classNames:{storyRiver:\\\"tc-story-river\\\",tiddlerFrame:\\\"tc-tiddler-frame\\\",tiddlerTitle:\\\"tc-title\\\"},references:{userConfig:\\\"$:/config/hotzone/focusOffset\\\",focussedTiddlerStore:\\\"$:/temp/focussedTiddler\\\"},checkbackTime:$tw.utils.getAnimationDuration()}})();\",\n \"type\": \"application/javascript\",\n \"module-type\": \"library\"\n },\n \"$:/plugins/felixhayashi/hotzone/hotzone.js\": {\n \"title\": \"$:/plugins/felixhayashi/hotzone/hotzone.js\",\n \"text\": \"/*\\\\\\n\\ntitle: $:/plugins/felixhayashi/hotzone/hotzone.js\\ntype: application/javascript\\nmodule-type: startup\\n\\n@preserve\\n\\n\\\\*/\\n(function(){\\\"use strict\\\";exports.name=\\\"hotzone\\\";exports.platforms=[\\\"browser\\\"];exports.after=[\\\"story\\\"];exports.synchronous=true;exports.startup=function(){var t=require(\\\"$:/plugins/felixhayashi/hotzone/config.js\\\").config;var e=null;var i=document.getElementsByClassName(t.classNames.storyRiver)[0];var r=$tw.wiki.getTiddlerData(t.references.userConfig,{});var s=isNaN(parseInt(r.focusOffset))?150:parseInt(r.focusOffset);var a=function(e,i,r){if(!(e instanceof Element))return;if(!$tw.utils.hasClass(e,t.classNames.tiddlerFrame))return;var s=e.getElementsByClassName(t.classNames.tiddlerTitle)[0];if(s){var a=s.innerText||s.textContent;return a.trim()}};var n=function(e,i){$tw.wiki.addTiddler(new $tw.Tiddler({title:t.references.focussedTiddlerStore,text:e},$tw.wiki.getModificationFields()));if(i){var r=document.getElementsByClassName(\\\"hzone-focus\\\")[0];if(r){$tw.utils.removeClass(r,\\\"hzone-focus\\\")}$tw.utils.addClass(i,\\\"hzone-focus\\\")}};var l=function(){var r=$tw.wiki.getTiddler(\\\"$:/StoryList\\\");if(r&&r.fields.list.length){var l=null;var o=Number.MAX_VALUE;var f=i.children;var u=t.classNames.tiddlerFrame;for(var d=f.length;d--;){if($tw.utils.hasClass(f[d],u)){var c=f[d].getBoundingClientRect();var v=Math.min(Math.abs(s-c.top),Math.abs(s-c.bottom));if(v=0;if(!r)return;f($tw.utils.getAnimationDuration()+10,true)}else if(t[\\\"$:/StoryList\\\"]){f($tw.utils.getAnimationDuration()+10,true)}};var d=function(t){f(300,false)};$tw.wiki.addEventListener(\\\"change\\\",u);window.addEventListener(\\\"scroll\\\",d,false);d()}})();\",\n \"type\": \"application/javascript\",\n \"module-type\": \"startup\"\n },\n \"$:/plugins/felixhayashi/hotzone/Configuration\": {\n \"title\": \"$:/plugins/felixhayashi/hotzone/Configuration\",\n \"text\": \"Please see the [[GitHub page|https://github.com/felixhayashi/TW5-HotZone]] for more information on the options.\\n\\nSave and reload the wiki to activate changes.\\n\\n\\n \\n \\n \\n \\n
Focus offset:<$edit-text tiddler=\\\"$:/config/hotzone/focusOffset\\\" tag=\\\"input\\\" default=\\\"71px\\\" />
\"\n },\n \"$:/temp/focussedTiddler\": {\n \"title\": \"$:/temp/focussedTiddler\"\n },\n \"$:/plugins/felixhayashi/hotzone/License\": {\n \"title\": \"$:/plugins/felixhayashi/hotzone/License\",\n \"text\": \"This code is released under the BSD license. For the exact terms visit:\\n\\nhttps://github.com/felixhayashi/TW5-HotZone/blob/master/LICENSE\"\n },\n \"$:/plugins/felixhayashi/hotzone/Readme\": {\n \"title\": \"$:/plugins/felixhayashi/hotzone/Readme\",\n \"text\": \"Please visit the [[GitHub page|https://github.com/felixhayashi/TW5-HotZone]] for more information.\"\n }\n }\n}","type":"application/json","author":"Felix Küppers","core-version":">=5.1.5","dependents":"","description":"HotZone – Be notified when tiddlers are scrolled into view","list":"Configuration License Readme","name":"hotzone","plugin-type":"plugin","released":"","source":"https://github.com/felixhayashi/TW5-HotZone","title":"$:/plugins/felixhayashi/hotzone","version":"0.0.3"}] \ No newline at end of file