Speed up and backup with Cloudflare Caching + Stay always online

Code to prevent caching on an update… <script src=“assets/js/custom.js?random=<?php echo $custom_js_filetime = filemtime(‚assets/js/custom.js‘); ?>“ type=“text/javascript“></script>   Testing <script> function tstamp(date) { date=new Date(date); return date.getDate()+“/“+(date.getMonth()+1)+“/“+date.getFullYear() + “ “ + date.getHours() +“:“+ date.getMinutes()+“:“+ date.getSeconds(); }; console.log(„%cDate Indexfile: “ + tstamp(<?=filemtime(‚index.php‘)?>), „color: red“); console.log(„%cDate custom.js: “ + tstamp(<?=$custom_js_filetime?>), „color: red“); </script> This will log the filetime of weiterlesen…

The Google Maps Customer Rating System Concepted by HG-System (2017)

On the 16. Sept. 2017 we write Larry Page and 3 other Coworkers of Google the Concept of the Google Maps Ranking System and Inclusion of the Data for Small Businesses. Until this Date, we had „only“ Streatnames and the satelite images.   „We like to bring customers and company’s together and helping grow who weiterlesen…

Usefull JavaScript’s & jQuery Code

#1 create a prototype function for e.g. a replaceAll function for strings: String.prototype.replaceAll = function(search, replacement) { var target = this; return target.replace(new RegExp(search, ‚g‘), replacement); }; Useage: var test1, test2; var str = „aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa“ test = str .replaceAll(„a“, „c“) „cccccccccccccccccccccccccccccc“ //combineable test2 = str.replace(„a“, „b“) .replaceAll(„a“, „c“) „bccccccccccccccccccccccccccccc“ jQuery Example: $(„body“).find(„div“).each(function() { $(this).setRandomColor(); }); weiterlesen…

Usefull Python Scripts

Remove lines from File containing: bad_words import sysbad_words = [‚one bad word‘,‘ another bad word‘]scriptname = sys.argv[0]for _old in sys.argv:if _old == scriptname:continue_new = _old + ‚_filter_x.log‘print(„processing ‚“ + _old + „‚\n\noutput: “ + _new + „\n\n\n\n“)with open(_old) as oldfile, open(_new, ‚w‘) as newfile:for line in oldfile:if any(bad_word in line for bad_word in bad_words):newfile.write(line) Combine weiterlesen…